(locator)
| 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) { |