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

Function convertToSubSelector

lib/locator.js:768–774  ·  view source on GitHub ↗

* @private * @param {CodeceptJS.LocatorOrString} locator * @returns {string}

(locator)

Source from the content-addressed store, hash-verified

766 * @returns {string}
767 */
768function convertToSubSelector(locator) {
769 const xpath = new Locator(locator, 'css').toXPath()
770 if (isXPathStartingWithRoundBrackets(xpath)) {
771 throw new Error('XPath with round brackets is not possible here! ' + 'May be a nested locator with at() last() or first() causes this error.')
772 }
773 return removePrefix(xpath)
774}

Callers 8

findMethod · 0.85
withChildMethod · 0.85
withDescendantMethod · 0.85
withoutChildMethod · 0.85
withoutDescendantMethod · 0.85
insideMethod · 0.85
afterMethod · 0.85
beforeMethod · 0.85

Calls 3

removePrefixFunction · 0.85
toXPathMethod · 0.80

Tested by

no test coverage detected