.toExist()
Asserts the element exists.
Usage
expect(value).toExist()
Returns
Promise: A promise that resolves if the assertion is successful.
Support
| Platform | Supported |
|---|---|
| iOS | Yes |
| Android | Yes |
| Web | Yes |
Examples
Check if the button exists:
const { element, by, expect } = require("appdriver");
(async () => {
const $button = element(by.label("button"));
await expect($button).toExist();
})();