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

Method withTextEquals

lib/locator.js:320–324  ·  view source on GitHub ↗

* Find an element with exact text * @param {string} text * @returns {Locator}

(text)

Source from the content-addressed store, hash-verified

318 * @returns {Locator}
319 */
320 withTextEquals(text) {
321 text = xpathLocator.literal(text)
322 const xpath = sprintf('%s[%s]', this.toXPath(), `.= ${text}`)
323 return new Locator({ xpath })
324 }
325
326 /**
327 * @param {Object.<string, string>} attributes

Callers 1

locator_test.jsFile · 0.80

Calls 1

toXPathMethod · 0.95

Tested by

no test coverage detected