* @param {String} text * @returns {Locator} * @deprecated Use Locator#withClass for word-exact class matching, or Locator#withAttrContains for substring matching.
(text)
| 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 |