@@ -48,27 +48,6 @@ def test_shake
48
48
assert @driver . shake
49
49
end
50
50
51
- def test_close_and_launch_app
52
- if @@core . automation_name == :espresso
53
- assert_raises ::Selenium ::WebDriver ::Error ::UnsupportedOperationError do
54
- @driver . close_app
55
- end
56
- else
57
- @driver . close_app
58
- assert ( @driver . wait_until { |d | d . app_state ( 'io.appium.android.apis' ) != :running_in_foreground } )
59
- end
60
-
61
- if @@core . automation_name == :espresso
62
- assert_raises ::Selenium ::WebDriver ::Error ::UnsupportedOperationError do
63
- @driver . launch_app
64
- end
65
- else
66
- @driver . launch_app
67
- e = @driver . wait_until { |d | d . find_element :accessibility_id , 'App' }
68
- assert_equal 'App' , e . text
69
- end
70
- end
71
-
72
51
def test_lock_unlock
73
52
@driver . lock
74
53
assert @driver . device_locked?
@@ -202,42 +181,6 @@ def test_touch_actions
202
181
@driver . back
203
182
end
204
183
205
- # @deprecated Appium::Core::TouchAction
206
- def test_swipe
207
- @driver . wait_until { |d | d . find_element :accessibility_id , 'App' } . click
208
-
209
- el = @driver . wait_until { |d | d . find_element :accessibility_id , 'Fragment' }
210
- rect = el . rect
211
-
212
- Appium ::Core ::TouchAction . new ( @driver )
213
- . swipe ( start_x : 75 , start_y : 500 , end_x : 75 , end_y : 500 , duration : 500 )
214
- . perform
215
- @driver . back # The above command become "tap" action since it doesn't move.
216
- el = @driver . wait_until { |d | d . find_element :accessibility_id , 'Fragment' }
217
- assert rect . x == el . rect . x
218
- assert rect . y == el . rect . y
219
-
220
- touch_action = Appium ::Core ::TouchAction . new ( @driver )
221
- . swipe ( start_x : 75 , start_y : 500 , end_x : 75 , end_y : 300 , duration : 500 )
222
-
223
- assert_equal :press , touch_action . actions [ 0 ] [ :action ]
224
- assert_equal ( { x : 75 , y : 500 } , touch_action . actions [ 0 ] [ :options ] )
225
-
226
- assert_equal :wait , touch_action . actions [ 1 ] [ :action ]
227
- assert_equal ( { ms : 500 } , touch_action . actions [ 1 ] [ :options ] )
228
-
229
- assert_equal :moveTo , touch_action . actions [ 2 ] [ :action ]
230
- assert_equal ( { x : 75 , y : 300 } , touch_action . actions [ 2 ] [ :options ] )
231
-
232
- assert_equal :release , touch_action . actions [ 3 ] [ :action ]
233
-
234
- touch_action . perform
235
- assert_equal [ ] , touch_action . actions
236
-
237
- assert rect . x == el . rect . x
238
- assert rect . y > el . rect . y
239
- end
240
-
241
184
def test_hidekeyboard
242
185
@driver . wait_until { |d | d . find_element :accessibility_id , 'App' } . click
243
186
@driver . wait_until { |d | d . find_element :accessibility_id , 'Activity' } . click
0 commit comments