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

Method withoutText

lib/locator.js:419–423  ·  view source on GitHub ↗

* Find an element that does NOT contain the provided text. * @param {string} text * @returns {Locator}

(text)

Source from the content-addressed store, hash-verified

417 * @returns {Locator}
418 */
419 withoutText(text) {
420 text = xpathLocator.literal(text)
421 const xpath = sprintf('%s[%s]', this.toXPath(), `not(contains(., ${text}))`)
422 return new Locator({ xpath })
423 }
424
425 /**
426 * Find an element that does NOT have any of the provided attribute/value pairs.

Callers 1

locator_test.jsFile · 0.80

Calls 1

toXPathMethod · 0.95

Tested by

no test coverage detected