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

Method waitForInvisible

lib/helper/WebDriver.js:2700–2712  ·  view source on GitHub ↗

* {{> waitForInvisible }}

(locator, sec = null)

Source from the content-addressed store, hash-verified

2698 * {{> waitForInvisible }}
2699 */
2700 async waitForInvisible(locator, sec = null) {
2701 const aSec = sec || this.options.waitForTimeoutInSeconds
2702
2703 return this.browser.waitUntil(
2704 async () => {
2705 const res = await this._res(locator)
2706 if (!res || res.length === 0) return true
2707 const selected = await forEachAsync(res, async el => el.isDisplayed())
2708 return !selected.length
2709 },
2710 { timeout: aSec * 1000, timeoutMsg: `element (${new Locator(locator)}) still visible after ${aSec} sec` },
2711 )
2712 }
2713
2714 /**
2715 * {{> waitToHide }}

Callers 1

waitToHideMethod · 0.95

Calls 2

_resMethod · 0.95
forEachAsyncFunction · 0.85

Tested by

no test coverage detected