Waits
Any command that targets an element has a built-in "wait until element visible" behavior. Read "Automatic Waits" to learn more.
I.wait
Wait for a specific duration using If you want the test to wait for a specific amount of time, you can use the I.wait
command.
Set the number of seconds you want to wait for in the first argument.
This example below starts a countdown timer of 60 seconds and waits for 10 seconds before pressing the "Stop" button to stop the timer.
// Go to google.com
I.goTo("https://google.com")
I.click("Accept all") // accept cookies
// Start a timer for 60 seconds
I.fill("Search", "set timer for 60 seconds")
I.pressEnter()
// Stop the timer after 10 seconds
I.wait(10)
I.click("Stop")
I.wait
command
Reference: Wait for a given amount of time
Usage
I.wait(seconds)
Parameters
Parameter | Type | Remarks |
---|---|---|
seconds | number | Number of seconds to wait for |