Skip to content
masterclass Buddy

Playwright · Method

locator.visible

locator.visible narrows a locator to visible elements. Use it before an action when the original locator also matches hidden elements.

Last updated

Since
v1.51

Syntax

locator.visible

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

Subscribe
  • locator.filter
  • locator.click
  • locator.locator
  • page.get_by_role
  • page.get_by_text

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