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

Method withClassAttr

lib/locator.js:497–500  ·  view source on GitHub ↗

* @param {String} text * @returns {Locator} * @deprecated Use Locator#withClass for word-exact class matching, or Locator#withAttrContains for substring matching.

(text)

Source from the content-addressed store, hash-verified

495 * @deprecated Use {@link Locator#withClass} for word-exact class matching, or {@link Locator#withAttrContains} for substring matching.
496 */
497 withClassAttr(text) {
498 const xpath = sprintf('%s[%s]', this.toXPath(), `contains(@class, '${text}')`)
499 return new Locator({ xpath })
500 }
501
502 /**
503 * @param {string} output

Callers 1

locator_test.jsFile · 0.80

Calls 1

toXPathMethod · 0.95

Tested by

no test coverage detected