Playwright · Method
page.getByTitle
page.getByTitle() finds elements by their title attribute. It returns a Locator that can be used for actions and assertions.
Last updated
- Since
- v1.27
Syntax
page.getByTitle(text, options?)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
getByRolegetByTextgetByLabelgetByPlaceholdergetByAltText