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

Method waitForDetached

lib/helper/WebDriver.js:2724–2737  ·  view source on GitHub ↗

* {{> waitForDetached }}

(locator, sec = null)

Source from the content-addressed store, hash-verified

2722 * {{> waitForDetached }}
2723 */
2724 async waitForDetached(locator, sec = null) {
2725 const aSec = sec || this.options.waitForTimeoutInSeconds
2726
2727 return this.browser.waitUntil(
2728 async () => {
2729 const res = await this._res(locator)
2730 if (!res || res.length === 0) {
2731 return true
2732 }
2733 return false
2734 },
2735 { timeout: aSec * 1000, timeoutMsg: `element (${new Locator(locator)}) still on page after ${aSec} sec` },
2736 )
2737 }
2738
2739 /**
2740 * {{> waitForFunction }}

Callers

nothing calls this directly

Calls 1

_resMethod · 0.95

Tested by

no test coverage detected