* Find an element with exact text * @param {string} text * @returns {Locator}
(text)
| 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 |