Skip to content
masterclass Buddy

Playwright · Interface

Locator

A Playwright locator describes how to find elements on a page. It resolves the current element when an action runs and supports chaining, filtering, waiting, and retries.

Last updated

Syntax

Page.Locator(selector)

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

Subscribe
  • Page.GetByRole()
  • Page.GetByLabel()
  • Page.GetByText()
  • Page.GetByTestId()
  • Locator.Filter()
  • Locator.AllAsync()

Source: Locators | Playwright .NET. Checked 2026-11-03.