The following functions are intended to handle timing on test automation.
While it is not recommended to use PauseFor (sleep time) on tests, sometimes it could be handy in troubleshooting.
Pauses (sleep) during test execution.
Parameters:
- seconds: the number of seconds to wait for.
Example of use:
&driver.PauseFor(3)
Waits (explicitly) for a ceirtain HTML element to be present (or visible) on the webpage.
Parameters:
- ID: the HTML element ID to wait for.
- Visible: When true, it also checks for an element to be visible.
Example of use:
&driver.WaitById("button1", true)
Waits (explicitly) for a link to be present (or visible) on the webpage.
Parameters:
- LinkText: the link text to wait for.
- Visible: When true, it also checks for an element to be visible.
Example of use:
&driver.WaitByLinkText("click here", true)
Waits (explicitly) for a ceirtain HTML element to be present (or visible) on the webpage using the element Name.
Parameters:
- Name: the HTML element NAME to wait for.
- Visible: When true, it also checks for an element to be visible.
Example of use:
&driver.WaitByName("LinksContainer", true)
Waits (explicitly) for a ceirtain HTML element to be present (or visible) on the webpage using the CSS selector.
Parameters:
- CSS: the CSS selector to the element that wants to wait for.
- Visible: When true, it also checks for an element to be visible.
Example of use:
&driver.WaitByCSS("#button1", true)
Waits (explicitly) for a certain HTML element to be present (or visible) on the webpage using the XPath selector.
Parameters:
- XPath: the XPath selector to the element that wants to wait for.
- Visible: When true, it also checks for an element to be visible.
Example of use:
&driver.WaitByXPath("//span/input", true)