module WDA::Custome
Public Instance Methods
dismiss_keyboard()
click to toggle source
Dismiss keyboard
# File lib/wda_lib/custom.rb, line 31 def dismiss_keyboard post '/wda/keyboard/dismiss' end
homescreen()
click to toggle source
Go to home screen
# File lib/wda_lib/custom.rb, line 9 def homescreen post(@base_url + '/wda/homescreen') end
kill_app(app_name)
click to toggle source
# File lib/wda_lib/custom.rb, line 39 def kill_app(app_name) double_tap_homebutton app_rect = xpath_search('Other', 'label', app_name).first.rect swipe(app_rect['x'] + 10, app_rect['x'] + 10, @win_y*4/5, @win_y/3) homescreen end
pause(duration)
click to toggle source
Deactivate application for given time
# File lib/wda_lib/custom.rb, line 19 def pause(duration) post '/wda/deactivateApp', { duration: duration } end
springboard()
click to toggle source
Same as homescreen, go to home screen
# File lib/wda_lib/custom.rb, line 14 def springboard homescreen end
timeouts(duration)
click to toggle source
Timeouts @param duration [Float] the timeout in milliseconds @return [void]
# File lib/wda_lib/custom.rb, line 26 def timeouts(duration) post '/timeouts', { type: 'xctevent', ms: duration } end