* Find an element containing a text * @param {string} text * @returns {Locator}
(text)
| 307 | * @returns {Locator} |
| 308 | */ |
| 309 | withText(text) { |
| 310 | text = xpathLocator.literal(text) |
| 311 | const xpath = sprintf('%s[%s]', this.toXPath(), `contains(., ${text})`) |
| 312 | return new Locator({ xpath }) |
| 313 | } |
| 314 | |
| 315 | /** |
| 316 | * Find an element with exact text |
no test coverage detected