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