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

Method withChild

lib/locator.js:255–258  ·  view source on GitHub ↗

* @param {CodeceptJS.LocatorOrString} locator * @returns {Locator}

(locator)

Source from the content-addressed store, hash-verified

253 * @returns {Locator}
254 */
255 withChild(locator) {
256 const xpath = sprintf('%s[./child::%s]', this.toXPath(), convertToSubSelector(locator))
257 return new Locator({ xpath })
258 }
259
260 /**
261 * @param {CodeceptJS.LocatorOrString} locator

Callers 1

locator_test.jsFile · 0.80

Calls 2

toXPathMethod · 0.95
convertToSubSelectorFunction · 0.85

Tested by

no test coverage detected