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

Method visibleFn

lib/helper/Playwright.js:3253–3259  ·  view source on GitHub ↗
([locator, num])

Source from the content-addressed store, hash-verified

3251 const context = await this._getContext()
3252 if (locator.isCSS()) {
3253 const visibleFn = function ([locator, num]) {
3254 const els = document.querySelectorAll(locator)
3255 if (!els || els.length === 0) {
3256 return false
3257 }
3258 return Array.prototype.filter.call(els, el => el.offsetParent !== null).length === num
3259 }
3260 waiter = context.waitForFunction(visibleFn, [locator.value, num], { timeout: waitTimeout })
3261 } else {
3262 const visibleFn = function ([locator, $XPath, num]) {

Callers

nothing calls this directly

Calls 2

filterMethod · 0.80
$XPathFunction · 0.70

Tested by

no test coverage detected