Module: WDA::Custome
- Included in:
- WDA
- Defined in:
- lib/wda_lib/custom.rb
Instance Method Summary collapse
-
#dismiss_keyboard ⇒ Object
Dismiss keyboard.
- #double_tap_homebutton ⇒ Object
-
#homescreen ⇒ Object
Go to home screen.
- #kill_app(app_name) ⇒ Object
-
#pause(duration) ⇒ Object
Deactivate application for given time.
-
#springboard ⇒ Object
Same as homescreen, go to home screen.
-
#timeouts(duration) ⇒ void
Timeouts.
Instance Method Details
#dismiss_keyboard ⇒ Object
Dismiss keyboard
31 32 33 |
# File 'lib/wda_lib/custom.rb', line 31 def dismiss_keyboard post '/wda/keyboard/dismiss' end |
#double_tap_homebutton ⇒ Object
35 36 37 |
# File 'lib/wda_lib/custom.rb', line 35 def post(@base_url + '/doubleTapHomescreen') end |
#homescreen ⇒ Object
Go to home screen
9 10 11 |
# File 'lib/wda_lib/custom.rb', line 9 def homescreen post(@base_url + '/wda/homescreen') end |
#kill_app(app_name) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/wda_lib/custom.rb', line 39 def kill_app(app_name) 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) ⇒ Object
Deactivate application for given time
19 20 21 |
# File 'lib/wda_lib/custom.rb', line 19 def pause(duration) post '/wda/deactivateApp', { duration: duration } end |
#springboard ⇒ Object
Same as homescreen, go to home screen
14 15 16 |
# File 'lib/wda_lib/custom.rb', line 14 def springboard homescreen end |
#timeouts(duration) ⇒ void
This method returns an undefined value.
Timeouts
26 27 28 |
# File 'lib/wda_lib/custom.rb', line 26 def timeouts(duration) post '/timeouts', { type: 'xctevent', ms: duration } end |