Module: WDA::Custome

Included in:
WDA
Defined in:
lib/wda_lib/custom.rb

Instance Method Summary collapse

Instance Method Details

#homescreenObject

Go to home screen



5
6
7
# File 'lib/wda_lib/custom.rb', line 5

def homescreen
  post(@base_url + '/homescreen')
end

#pause(duration) ⇒ Object

Deactivate application for given time



15
16
17
# File 'lib/wda_lib/custom.rb', line 15

def pause(duration)
  post '/deactivateApp', { duration: duration }
end

#springboardObject

Same as homescreen, go to home screen



10
11
12
# File 'lib/wda_lib/custom.rb', line 10

def springboard
  homescreen
end

#timeout(duraiton) ⇒ void

This method returns an undefined value.

Timeout(without Session)

Parameters:

  • duraiton (Float)

    the timeout in milliseconds



22
23
24
# File 'lib/wda_lib/custom.rb', line 22

def timeout(duraiton)
  post(@base_url + '/timeout', { type: 'xctevent', ms: duration })
end

#timeout_in_session(duraiton) ⇒ void

This method returns an undefined value.

Timeout(with Session)

Parameters:

  • duration (Float)

    the timeout in milliseconds



29
30
31
# File 'lib/wda_lib/custom.rb', line 29

def timeout_in_session(duraiton)
  post '/timeout', { type: 'xctevent', ms: duration }
end