Playwright Locator Practice Page

Playwright locator: get_by_role()

Elements with explicit and implicit accessibility roles.

Explicit Role Link robot icon
Implicit Link

Playwright locator: get_by_text()

Locate elements by their visible text content.

This text span can be located by its text.

Blue Box

Playwright locator: get_by_label()

Locate form controls by their associated label text.



Playwright locator: get_by_placeholder()

Locate inputs using their placeholder attribute.



Playwright locator: get_by_alt_text()

Locate images using their alt text.

python logo javascript logo

Playwright locator: get_by_title()

Locate elements by their title attribute (tooltip text).

Home

Playwright locator: get_by_test_id()

Locate elements using a data-testid attribute.

Form not submitted