File tree Expand file tree Collapse file tree 7 files changed +19
-10
lines changed Expand file tree Collapse file tree 7 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -80,19 +80,19 @@ You also can run particular tests like below.
80
80
### Unit
81
81
82
82
```
83
- $ py.test test/unit
83
+ $ pytest test/unit
84
84
```
85
85
86
86
Run with `pytest-xdist`
87
87
88
88
```
89
- $ py.test -n 2 test/unit
89
+ $ pytest -n 2 test/unit
90
90
```
91
91
92
92
### Functional
93
93
94
94
```
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
96
96
```
97
97
98
98
### In parallel for iOS
@@ -103,7 +103,7 @@ $ py.test test/functional/ios/find_by_ios_class_chain_tests.py
103
103
```
104
104
3. Run tests
105
105
```
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
107
107
```
108
108
109
109
# Release
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ parameters:
2
2
vmImage : ' macOS-10.14'
3
3
pytestOpt : ' --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html'
4
4
androidSdkVer : 27
5
- xcodeForIOS : 10 .3
5
+ xcodeForIOS : 11 .3
6
6
CI : true
7
7
8
8
# [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):
28
28
desired_caps = {
29
29
'deviceName' : iphone_device_name (),
30
30
'platformName' : 'iOS' ,
31
- 'platformVersion' : '12.4 ' ,
31
+ 'platformVersion' : '13.3 ' ,
32
32
'automationName' : 'XCUITest' ,
33
33
'allowTouchIdEnroll' : True ,
34
34
'wdaLocalPort' : wda_port (),
35
+ 'simpleIsVisibleCheck' : True
35
36
}
36
37
37
38
if app is not None :
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ def test_hide_keyboard(self):
23
23
self ._move_to_textbox ()
24
24
25
25
el = self .driver .find_elements_by_class_name ('XCUIElementTypeTextField' )[0 ]
26
+ el .click ()
26
27
el .set_value ('Testing' )
27
28
28
29
el = self .driver .find_element_by_class_name ('UIAKeyboard' )
@@ -36,6 +37,7 @@ def test_hide_keyboard_presskey_strategy(self):
36
37
self ._move_to_textbox ()
37
38
38
39
el = self .driver .find_elements_by_class_name ('XCUIElementTypeTextField' )[0 ]
40
+ el .click ()
39
41
el .set_value ('Testing' )
40
42
41
43
el = self .driver .find_element_by_class_name ('UIAKeyboard' )
@@ -49,6 +51,7 @@ def test_hide_keyboard_no_key_name(self):
49
51
self ._move_to_textbox ()
50
52
51
53
el = self .driver .find_elements_by_class_name ('XCUIElementTypeTextField' )[0 ]
54
+ el .click ()
52
55
el .set_value ('Testing' )
53
56
54
57
el = self .driver .find_element_by_class_name ('UIAKeyboard' )
@@ -64,6 +67,7 @@ def test_is_keyboard_shown(self):
64
67
self ._move_to_textbox ()
65
68
66
69
el = self .driver .find_elements_by_class_name ('XCUIElementTypeTextField' )[0 ]
70
+ el .click ()
67
71
el .set_value ('Testing' )
68
72
self .assertTrue (self .driver .is_keyboard_shown ())
69
73
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def test_find_element_by_path(self):
27
27
self .assertEqual ('Action Sheets' , c_el [0 ].get_attribute ('name' ))
28
28
29
29
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' ))
31
31
32
32
c_el = el .find_elements_by_accessibility_id ('UICatalog' )
33
33
self .assertEqual ('UICatalog' , c_el [0 ].get_attribute ('name' ))
Original file line number Diff line number Diff line change 19
19
20
20
class FindByIOClassChainTests (BaseTestCase ):
21
21
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' ))
24
25
25
26
def test_find_multiple_elements_by_path (self ):
26
27
el = self .driver .find_elements_by_ios_class_chain ('XCUIElementTypeWindow/*/*/*' )
27
- self .assertEqual (6 , len (el ))
28
+ self .assertEqual (2 , len (el ))
28
29
self .assertEqual ('UICatalog' , el [0 ].get_attribute ('name' ))
29
30
self .assertEqual (None , el [1 ].get_attribute ('name' ))
30
31
Original file line number Diff line number Diff line change @@ -78,7 +78,10 @@ def test_clear(self):
78
78
79
79
# Input some text, verify
80
80
input_text = 'blah'
81
+ el .click ()
81
82
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 ]
82
85
text = el .get_attribute ('value' )
83
86
self .assertEqual (text , input_text )
84
87
You can’t perform that action at this time.
0 commit comments