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

Method and

lib/locator.js:473–476  ·  view source on GitHub ↗

* Append a raw XPath predicate. Escape hatch for expressions not covered by the DSL. * Argument is inserted as-is inside `[ ]`; quoting/escaping is the caller's responsibility. * * Example: * locate('input').and('@type="text" or @type="email"') * * @param {string} xpathExpression

(xpathExpression)

Source from the content-addressed store, hash-verified

471 * @returns {Locator}
472 */
473 and(xpathExpression) {
474 const xpath = sprintf('%s[%s]', this.toXPath(), xpathExpression)
475 return new Locator({ xpath })
476 }
477
478 /**
479 * Append a negated raw XPath predicate: `[not(expr)]`.

Callers 1

locator_test.jsFile · 0.80

Calls 1

toXPathMethod · 0.95

Tested by

no test coverage detected