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

Method enabledFn

lib/helper/Puppeteer.js:2300–2306  ·  view source on GitHub ↗
(locator)

Source from the content-addressed store, hash-verified

2298 const context = await this._getContext()
2299 if (locator.isCSS()) {
2300 const enabledFn = function (locator) {
2301 const els = document.querySelectorAll(locator)
2302 if (!els || els.length === 0) {
2303 return false
2304 }
2305 return Array.prototype.filter.call(els, el => !el.disabled).length > 0
2306 }
2307 waiter = context.waitForFunction(enabledFn, { timeout: waitTimeout }, locator.value)
2308 } else {
2309 const enabledFn = function (locator, $XPath) {

Callers

nothing calls this directly

Calls 2

filterMethod · 0.80
$XPathFunction · 0.70

Tested by

no test coverage detected