This repository has been archived by the owner on Sep 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
wait
sreepad edited this page Aug 16, 2016
·
3 revisions
####Note The default synchronization/wait time/timeout is given in capabilities (appium.txt) during the session start up. Use below methods if you want to modify based on your needs.
There are two wait methods defined.
Below method changes the timeout for all the subsequent actions in the current session.
wait_until (timeout, message, &block)
# timeout: default timeout is 5 seconds. Add an integer value if you want to increase or decrease the timeout.
# message: message parameter adds message to the log
# add a block where you want to start using this timeout value
Usage
wait_until(10, "some_message") do
login? # checking if login button exists
end
Below method changes the timeout only for the current action or method.
wait_step (timeout, message, &block)
# timeout: default timeout is 5 seconds. Add an integer value if you want to increase or decrease the timeout.
# message: message parameter adds message to the log
# add a block where you want to start using this timeout value
Usage
wait_step(10, "some_message") do
login?
end
####Best Practices
Use this method in a DSL method inside screen object.