Skip to content
masterclass Buddy

Playwright · Method

page.getByPlaceholder

getByPlaceholder() finds an input by its placeholder text and returns a Locator. Use the Locator for actions such as filling the input.

Last updated

Since
v1.27

Syntax

page.getByPlaceholder(text, options?) : Locator

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Locator
  • page.locator()
  • getByLabel
  • getByRole
  • getByText
  • getByTitle

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