Wednesday, July 10, 2013

calabash-android Waiting Steps

WAITING STEPS

This is one of the major aspects of any Test Automation. Waiting for Object (Image,Text,Label,Link, Button etc) to appear before launching\Perform the next user action.

The Custom Steps to WAIT are as described below:

Then /^I wait for progress$/ do
Will wait till there is no more progress bars.

Then /^I wait for dialog to close$/
Waits for the current dialog to close.

Then /^I wait for "([^\"]*)" to appear$/
Then /^I wait to see "([^\"]*)"$/
Waits for the specified text to appear.

Then /^I wait up to (\d+) seconds for "([^\"]*)" to appear$/
Then /^I wait up to (\d+) seconds to see "([^\"]*)"$/
Waits for the specified text to appear, with a custom timeout

Then /^I wait for the "([^\"]*)" button to appear$/
Waits for a button with the specified text to appear.

Then /^I wait for the "([^\"]*)" screen to appear$/
Waits for a particular screen (Android Activity) to appear.

Then /^I wait for the view with id "([^\"]*)" to appear$/ do |text|
Waits for a view view that id to appear. Note that use the short name and not the fully quantified name. That means if your id is 'com.foo.R.id.bar_label' you would use 'I press view with id "bar_label"'.

Then /^I wait up to (\d+) seconds for the "([^\"]*)" screen to appear$/
Then /^I wait upto (\d+) seconds for the "([^\"]*)" screen to appear$/
Waits for a particular screen (Android Activity) to appear with a timeout.

Then /^I wait for 1 second$/
Then /^I wait for a second$/
Waits for one second.

Then /^I wait$/
Waits for two seconds.

Then /^I wait for (\d+) seconds$/
Waits for a specified number of seconds

No comments:

Post a Comment