File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,19 +80,19 @@ You also can run particular tests like below.
8080### Unit
8181
8282```
83- $ py.test test/unit
83+ $ pytest test/unit
8484```
8585
8686Run with `pytest-xdist`
8787
8888```
89- $ py.test -n 2 test/unit
89+ $ pytest -n 2 test/unit
9090```
9191
9292### Functional
9393
9494```
95- $ py.test test/functional/ios/find_by_ios_class_chain_tests.py
95+ $ pytest test/functional/ios/find_by_ios_class_chain_tests.py
9696```
9797
9898### In parallel for iOS
@@ -103,7 +103,7 @@ $ py.test test/functional/ios/find_by_ios_class_chain_tests.py
103103 ```
1041043. Run tests
105105 ```
106- $ py.test -n 2 test/functional/ios/find_by_ios_class_chain_tests.py
106+ $ pytest -n 2 test/functional/ios/find_by_ios_class_chain_tests.py
107107 ```
108108
109109# Release
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ parameters:
22 vmImage : ' macOS-10.14'
33 pytestOpt : ' --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html'
44 androidSdkVer : 27
5- xcodeForIOS : 10 .3
5+ xcodeForIOS : 11 .3
66 CI : true
77
88# [Android] Need to fix and add flaky tests for activities_tests, find_by_uiautomator_tests
Original file line number Diff line number Diff line change @@ -28,10 +28,11 @@ def get_desired_capabilities(app=None):
2828 desired_caps = {
2929 'deviceName' : iphone_device_name (),
3030 'platformName' : 'iOS' ,
31- 'platformVersion' : '12.4 ' ,
31+ 'platformVersion' : '13.3 ' ,
3232 'automationName' : 'XCUITest' ,
3333 'allowTouchIdEnroll' : True ,
3434 'wdaLocalPort' : wda_port (),
35+ 'simpleIsVisibleCheck' : True
3536 }
3637
3738 if app is not None :
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ def test_hide_keyboard(self):
2323 self ._move_to_textbox ()
2424
2525 el = self .driver .find_elements_by_class_name ('XCUIElementTypeTextField' )[0 ]
26+ el .click ()
2627 el .set_value ('Testing' )
2728
2829 el = self .driver .find_element_by_class_name ('UIAKeyboard' )
@@ -36,6 +37,7 @@ def test_hide_keyboard_presskey_strategy(self):
3637 self ._move_to_textbox ()
3738
3839 el = self .driver .find_elements_by_class_name ('XCUIElementTypeTextField' )[0 ]
40+ el .click ()
3941 el .set_value ('Testing' )
4042
4143 el = self .driver .find_element_by_class_name ('UIAKeyboard' )
@@ -49,6 +51,7 @@ def test_hide_keyboard_no_key_name(self):
4951 self ._move_to_textbox ()
5052
5153 el = self .driver .find_elements_by_class_name ('XCUIElementTypeTextField' )[0 ]
54+ el .click ()
5255 el .set_value ('Testing' )
5356
5457 el = self .driver .find_element_by_class_name ('UIAKeyboard' )
@@ -64,6 +67,7 @@ def test_is_keyboard_shown(self):
6467 self ._move_to_textbox ()
6568
6669 el = self .driver .find_elements_by_class_name ('XCUIElementTypeTextField' )[0 ]
70+ el .click ()
6771 el .set_value ('Testing' )
6872 self .assertTrue (self .driver .is_keyboard_shown ())
6973
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def test_find_element_by_path(self):
2727 self .assertEqual ('Action Sheets' , c_el [0 ].get_attribute ('name' ))
2828
2929 c_el = el .find_elements_by_ios_class_chain ('**/XCUIElementTypeStaticText' )
30- self .assertEqual ('Action Sheets ' , c_el [0 ].get_attribute ('name' ))
30+ self .assertEqual ('UICatalog ' , c_el [0 ].get_attribute ('name' ))
3131
3232 c_el = el .find_elements_by_accessibility_id ('UICatalog' )
3333 self .assertEqual ('UICatalog' , c_el [0 ].get_attribute ('name' ))
Original file line number Diff line number Diff line change 1919
2020class FindByIOClassChainTests (BaseTestCase ):
2121 def test_find_element_by_path (self ):
22- el = self .driver .find_element_by_ios_class_chain ('XCUIElementTypeWindow/**/XCUIElementTypeStaticText' )
23- self .assertEqual ('Action Sheets' , el .get_attribute ('name' ))
22+ els = self .driver .find_elements_by_ios_class_chain ('XCUIElementTypeWindow/**/XCUIElementTypeStaticText' )
23+ self .assertEqual (35 , len (els ))
24+ self .assertEqual ('UICatalog' , els [0 ].get_attribute ('name' ))
2425
2526 def test_find_multiple_elements_by_path (self ):
2627 el = self .driver .find_elements_by_ios_class_chain ('XCUIElementTypeWindow/*/*/*' )
27- self .assertEqual (6 , len (el ))
28+ self .assertEqual (2 , len (el ))
2829 self .assertEqual ('UICatalog' , el [0 ].get_attribute ('name' ))
2930 self .assertEqual (None , el [1 ].get_attribute ('name' ))
3031
Original file line number Diff line number Diff line change @@ -78,7 +78,10 @@ def test_clear(self):
7878
7979 # Input some text, verify
8080 input_text = 'blah'
81+ el .click ()
8182 el .send_keys (input_text )
83+ # TODO Needs to get the element again to update value in the element. Remove below one line when it's fixed.
84+ el = self .driver .find_elements_by_class_name ('XCUIElementTypeTextField' )[0 ]
8285 text = el .get_attribute ('value' )
8386 self .assertEqual (text , input_text )
8487
You can’t perform that action at this time.
0 commit comments