MCPcopy
hub / github.com/codeceptjs/CodeceptJS / _isCustomLocator

Method _isCustomLocator

lib/helper/WebDriver.js:618–628  ·  view source on GitHub ↗
(locator)

Source from the content-addressed store, hash-verified

616 }
617
618 _isCustomLocator(locator) {
619 const locatorObj = new Locator(locator)
620 if (locatorObj.isCustom()) {
621 const customLocator = this._lookupCustomLocator(locatorObj.type)
622 if (customLocator) {
623 return true
624 }
625 throw new Error('Please define "customLocatorStrategies" as an Object and the Locator Strategy as a "function".')
626 }
627 return false
628 }
629
630 async _res(locator) {
631 const res = this._isShadowLocator(locator) || this._isCustomLocator(locator) ? await this._locate(locator) : await this.$$(withStrictLocator(locator))

Callers 5

_resMethod · 0.95
_locateMethod · 0.95
findClickableFunction · 0.80
findFieldsFunction · 0.80
findCheckableFunction · 0.80

Calls 2

isCustomMethod · 0.95
_lookupCustomLocatorMethod · 0.95

Tested by

no test coverage detected