MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / waitForClickable

Method waitForClickable

lib/helper/WebDriver.js:2502–2516  ·  view source on GitHub ↗

* {{> waitForClickable }}

(locator, waitTimeout)

Source from the content-addressed store, hash-verified

2500 * {{> waitForClickable }}
2501 */
2502 async waitForClickable(locator, waitTimeout) {
2503 waitTimeout = waitTimeout || this.options.waitForTimeoutInSeconds
2504 let res = await this._locate(locator)
2505 res = usingFirstElement(res)
2506 assertElementExists(res, locator)
2507
2508 return res
2509 .waitForClickable({
2510 timeout: waitTimeout * 1000,
2511 timeoutMsg: `element ${res.selector} still not clickable after ${waitTimeout} sec`,
2512 })
2513 .catch(e => {
2514 throw wrapError(e)
2515 })
2516 }
2517
2518 /**
2519 * {{> waitInUrl }}

Callers

nothing calls this directly

Calls 4

_locateMethod · 0.95
usingFirstElementFunction · 0.85
assertElementExistsFunction · 0.70
wrapErrorFunction · 0.70

Tested by

no test coverage detected