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

Function isXPath

lib/locator.js:710–713  ·  view source on GitHub ↗

* @private * Checks if `locator` is XPath locator * @param {string} locator * * @returns {boolean}

(locator)

Source from the content-addressed store, hash-verified

708 * @returns {boolean}
709 */
710function isXPath(locator) {
711 const trimmed = locator.replace(/^\(+/, '').substr(0, 2)
712 return trimmed === '//' || trimmed === './'
713}
714
715/**
716 * @private

Callers 2

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected