* 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)
| 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)]`. |