waitForClickable
Wait for an element for the provided amount of milliseconds to be clickable or not clickable.
Usage
$(selector).waitForClickable(options, options.timeout, options.reverse, options.timeoutMsg, options.interval)
Parameters
Name | Type | Details |
---|---|---|
options optional | WaitForOptions, undefined | Object (optional) |
options.timeout optional | Number , undefined | time in ms (default: waitforTimeout ) |
options.reverse optional | Boolean , undefined | if true it waits for the opposite (default: false) |
options.timeoutMsg optional | String , undefined | error message to throw when waitUntil times out |
options.interval optional | Number , undefined | interval between checks (default: waitforInterval ) |
Example
it('should detect when element is clickable', () => {
const elem = $('#elem')
elem.waitForClickable({ timeout: 3000 });
});
it('should detect when element is no longer clickable', () => {
const elem = $('#elem')
elem.waitForClickable({ reverse: true });
});