.waitToBeVisible(options)
Polls for an alert to be visible every options.interval until found or exceeds options.maxDuration timeout.
Usage
alert.waitToBeVisible(options)
Parameters
options(Object?):options.interval(Number?): Duration in milliseconds to wait between polling. Defaults towaitForInterval.options.maxDuration(Number?): Max duration in milliseconds to poll before throwing. Defaults towaitForTimeout.
Returns
Promise: A promise that resolves once an alert is visible.
Support
| Platform | Supported |
|---|---|
| iOS | Yes |
| Android | Yes |
| Web | Yes |
Examples
TODO: Description here.
const { element, by, alert } = require("appdriver");
(async () => {
await element(by.label("button")).tap();
await alert.waitToBeVisible();
await alert.accept();
})();