Skip to content
masterclass Buddy

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.

Subscribe
  • getByRole
  • getByText
  • getByLabel
  • getByPlaceholder
  • getByAltText

Source: Locator | Playwright. Checked 2026-11-03.