@@ -70,18 +70,18 @@ def before_first
70
70
71
71
t 'back' do
72
72
# start page
73
- tag ( UI :: Inventory . navbar ) . name . must_equal 'UICatalog'
73
+ tag ( ui_ios . navbar ) . name . must_equal 'UICatalog'
74
74
# nav to new page.
75
75
wait_true do
76
76
text ( 'buttons' ) . click
77
- tag ( UI :: Inventory . navbar ) . name == 'Buttons'
77
+ tag ( ui_ios . navbar ) . name == 'Buttons'
78
78
end
79
79
80
- tag ( UI :: Inventory . navbar ) . name . must_equal 'Buttons'
80
+ tag ( ui_ios . navbar ) . name . must_equal 'Buttons'
81
81
# go back
82
82
back_click
83
83
# start page
84
- tag ( UI :: Inventory . navbar ) . name . must_equal 'UICatalog'
84
+ tag ( ui_ios . navbar ) . name . must_equal 'UICatalog'
85
85
end
86
86
87
87
t 'session_id' do
@@ -90,25 +90,25 @@ def before_first
90
90
end
91
91
92
92
t 'xpath' do
93
- xpath ( "//#{ UI :: Inventory . static_text } " ) . name . must_equal 'UICatalog'
93
+ xpath ( "//#{ ui_ios . static_text } " ) . name . must_equal 'UICatalog'
94
94
end
95
95
96
96
t 'xpaths' do
97
- xpaths ( "//#{ UI :: Inventory . static_text } " ) . length . must_equal 25
97
+ xpaths ( "//#{ ui_ios . static_text } " ) . length . must_equal 25
98
98
end
99
99
100
100
def uibutton_text
101
101
'Buttons'
102
102
end
103
103
104
104
t 'ele_index' do
105
- ele_index ( UI :: Inventory . static_text , 2 ) . name . must_equal uibutton_text
105
+ ele_index ( ui_ios . static_text , 2 ) . name . must_equal uibutton_text
106
106
end
107
107
108
108
# TODO: 'string_attr_exact'
109
109
110
110
t 'find_ele_by_attr' do
111
- el_id = find_ele_by_attr ( UI :: Inventory . static_text , 'name' , uibutton_text ) . instance_variable_get :@id
111
+ el_id = find_ele_by_attr ( ui_ios . static_text , 'name' , uibutton_text ) . instance_variable_get :@id
112
112
el_id . must_match ( /\d +/ )
113
113
end
114
114
@@ -117,10 +117,10 @@ def uibutton_text
117
117
# no space after the !
118
118
set_wait 1
119
119
# empty array returned when no match
120
- found = !find_eles_by_attr ( UI :: Inventory . static_text , 'name' , uibutton_text ) . empty?
120
+ found = !find_eles_by_attr ( ui_ios . static_text , 'name' , uibutton_text ) . empty?
121
121
found . must_equal true
122
122
123
- found = !find_eles_by_attr ( UI :: Inventory . static_text , 'name' , 'zz' ) . empty?
123
+ found = !find_eles_by_attr ( ui_ios . static_text , 'name' , 'zz' ) . empty?
124
124
found . must_equal false
125
125
set_wait
126
126
end
@@ -144,16 +144,16 @@ def uibutton_text
144
144
# TODO: 'string_attr_include'
145
145
146
146
t 'find_ele_by_attr_include' do
147
- el_text = find_ele_by_attr_include ( UI :: Inventory . static_text , :name , 'button' ) . text
147
+ el_text = find_ele_by_attr_include ( ui_ios . static_text , :name , 'button' ) . text
148
148
el_text . must_equal uibutton_text
149
149
150
- el_name = find_ele_by_attr_include ( UI :: Inventory . static_text , :name , 'button' ) . name
150
+ el_name = find_ele_by_attr_include ( ui_ios . static_text , :name , 'button' ) . name
151
151
el_name . must_equal uibutton_text
152
152
end
153
153
154
154
t 'find_eles_by_attr_include' do
155
- ele_count = find_eles_by_attr_include ( UI :: Inventory . static_text , :name , 'e' ) . length
156
- expected = UI :: Inventory . xcuitest ? ? 20 : 19
155
+ ele_count = find_eles_by_attr_include ( ui_ios . static_text , :name , 'e' ) . length
156
+ expected = automation_name_is_xcuitest ? ? 20 : 19
157
157
ele_count . must_equal expected
158
158
end
159
159
@@ -170,13 +170,13 @@ def uibutton_text
170
170
end
171
171
172
172
t 'first_ele' do
173
- first_ele ( UI :: Inventory . static_text ) . name . must_equal 'UICatalog'
173
+ first_ele ( ui_ios . static_text ) . name . must_equal 'UICatalog'
174
174
end
175
175
176
176
t 'last_ele' do
177
177
expected = 'Transitions'
178
178
179
- el = last_ele ( UI :: Inventory . static_text )
179
+ el = last_ele ( ui_ios . static_text )
180
180
el . text . must_equal expected
181
181
el . name . must_equal expected
182
182
end
@@ -195,15 +195,15 @@ def uibutton_text
195
195
end
196
196
197
197
t 'tag' do
198
- tag ( UI :: Inventory . navbar ) . name . must_equal 'UICatalog'
198
+ tag ( ui_ios . navbar ) . name . must_equal 'UICatalog'
199
199
end
200
200
201
201
t 'tags' do
202
- tags ( UI :: Inventory . table_cell ) . length . must_equal 12
202
+ tags ( ui_ios . table_cell ) . length . must_equal 12
203
203
end
204
204
205
205
t 'find_eles_by_attr_include_length' do
206
- find_eles_by_attr_include ( UI :: Inventory . static_text , 'name' , 'Use' ) . length . must_equal 7
206
+ find_eles_by_attr_include ( ui_ios . static_text , 'name' , 'Use' ) . length . must_equal 7
207
207
end
208
208
209
209
t 'get_page_class' do
0 commit comments