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

Method withoutChild

lib/locator.js:444–447  ·  view source on GitHub ↗

* Find an element that has no direct child matching the provided locator. * @param {CodeceptJS.LocatorOrString} locator * @returns {Locator}

(locator)

Source from the content-addressed store, hash-verified

442 * @returns {Locator}
443 */
444 withoutChild(locator) {
445 const xpath = sprintf('%s[not(./child::%s)]', this.toXPath(), convertToSubSelector(locator))
446 return new Locator({ xpath })
447 }
448
449 /**
450 * Find an element that has no descendant matching the provided locator.

Callers 1

locator_test.jsFile · 0.80

Calls 2

toXPathMethod · 0.95
convertToSubSelectorFunction · 0.85

Tested by

no test coverage detected