webdriverio
Version:
Next-gen browser and mobile automation test framework for Node.js
19 lines (17 loc) • 480 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = waitForExist;
function waitForExist({
timeout = this.options.waitforTimeout,
interval = this.options.waitforInterval,
reverse = false,
timeoutMsg = `element ("${this.selector}") still ${reverse ? '' : 'not '}existing after ${timeout}ms`
} = {}) {
return this.waitUntil(async () => reverse !== (await this.isExisting()), {
timeout,
interval,
timeoutMsg
});
}