.waitToBeVisible(options)
Polls until the element is visible every options.interval or exceeds options.maxDuration timeout.
Usage
element(matcher).waitToBeVisible(options)
Parameters
options(Object?):options.interval(Number?): Duration in milliseconds to wait between polling. Defaults to 200.options.maxDuration(Number?): Max duration in milliseconds to poll for before throwing. Defaults to 10000.
Returns
Element: A new element to avoid mutation and allow function chaining.
Support
| Platform | Supported |
|---|---|
| iOS | Yes |
| Android | Yes |
| Web | Yes |
Examples
Wait for a button to be visible:
const { element, by } = require("appdriver");
(async () => {
await element(by.label("button"))
.waitToBeVisible();
})();
Related Methods
.waitFor(condition, options).waitToExist(options).waitToBeInvisible(options).waitToNotExist(options).waitToBeFocused(options)