Skip to content
masterclass Buddy

Playwright · Method

page.getByRef

Page.getByRef finds an element by an ARIA reference from the latest AI-mode accessibility snapshot. It returns a locator that can be used for actions such as clicking.

Last updated

Since
v1.64

Syntax

page.getByRef(String ref)

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

Subscribe
  • Page.ariaSnapshot()
  • Locator.normalize()
  • Locator.click()
  • Page.locator()

Source: Page | Playwright Java. Checked 2026-11-03.