([locator, $XPath])
| 3174 | waiter = context.waitForFunction(valueFn, [locator.value], { timeout: waitTimeout }) |
| 3175 | } else { |
| 3176 | const enabledFn = function ([locator, $XPath]) { |
| 3177 | eval($XPath) |
| 3178 | return $XPath(null, locator).filter(el => !el.disabled).length > 0 |
| 3179 | } |
| 3180 | waiter = context.waitForFunction(enabledFn, [locator.value, $XPath.toString()], { timeout: waitTimeout }) |
| 3181 | } |
| 3182 | return waiter.catch(err => { |