Playwright · Method
locator.innerText
locator.innerText() returns the rendered text of the element matched by a locator. Use it when you need the element's visible text.
Last updated
- Since
- v1.14
Syntax
await locator.innerText(options);In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
allInnerTextsallTextContentstextContenttoHaveText