* {{> waitForClickable }}
(locator, waitTimeout)
| 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 }} |
nothing calls this directly
no test coverage detected