Skip to content
masterclass Buddy

Playwright · Method

page.locator

A Playwright Locator describes how to find page elements. It supports actions and queries with auto-waiting and retrying.

Last updated

Since
v1.14

Syntax

page.locator(selector)

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

Subscribe
  • page.locator
  • page.get_by_role
  • page.get_by_label
  • page.get_by_placeholder
  • locator.all
  • locator.count
  • locator.click
  • locator.check

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