@@ -40,7 +40,7 @@ def is_sauce
40
40
sauce_username : nil ,
41
41
sauce_access_key : nil ,
42
42
port : 4723 ,
43
- device : ' android' ,
43
+ device : : android,
44
44
debug : true }
45
45
46
46
actual . must_equal expected
@@ -128,7 +128,7 @@ def validate_path path;
128
128
t 'restart' do
129
129
set_wait 1 # ensure wait is 1 before we restart.
130
130
restart
131
- mobile ( :currentActivity ) . must_equal '.ApiDemos'
131
+ current_activity . must_equal '.ApiDemos'
132
132
end
133
133
134
134
t 'driver' do
@@ -142,6 +142,7 @@ def validate_path path;
142
142
start_driver # tested by restart
143
143
no_wait # posts value to server, it's not stored locally
144
144
set_wait # posts value to server, it's not stored locally
145
+ execute_script # 'mobile: ' is deprecated and plain executeScript unsupported
145
146
=end
146
147
t 'default_wait' do
147
148
set_wait 1
@@ -154,24 +155,14 @@ def validate_path path;
154
155
exists ( 0 , 0 ) { raise 'error' } . must_equal false
155
156
end
156
157
157
- # any script
158
- t 'execute_script' do
159
- execute_script ( 'mobile: currentActivity' ) . must_equal '.ApiDemos'
160
- end
161
-
162
- # any mobile method
163
- t 'mobile' do
164
- mobile ( :currentActivity ) . must_equal '.ApiDemos'
165
- end
166
-
167
158
# any elements
168
159
t 'find_elements' do
169
- find_elements ( :tag_name , :text ) . length . must_equal 12
160
+ find_elements ( :class_name , 'android.widget.TextView' ) . length . must_equal 12
170
161
end
171
162
172
163
# any element
173
164
t 'find_element' do
174
- find_element ( :tag_name , :text ) . class . must_equal Selenium ::WebDriver ::Element
165
+ find_element ( :class_name , 'android.widget.TextView' ) . class . must_equal Selenium ::WebDriver ::Element
175
166
end
176
167
177
168
# Skip: x # x is only used in Pry
0 commit comments