Playwright + Java · Lesson 21 of 38
Module 21: Web Elements
Your task
Implement clickRowAction:
Write it in the editor, then press Check answer (Ctrl + Enter).
Locator tableRows = page.locator("table#orders-table tbody tr");
Locator targetRow = tableRows.filter(new Locator.FilterOptions().setHasText("ORD-9842"));
targetRow.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("View")).click();Modern web applications feature rich dynamic widgets: data tables with pagination, searchable multi-selects, sliders, and calendars. In this lesson, you will learn robust patterns to automate complex web elements cleanly in Java. Let's tackle rich UI widgets!
Part of the Playwright + Java course (Playwright with Java). Practice this concept live in the Playwright Online Compiler or explore our free automation practice form.
Use page.mouse().wheel(0, 1000) or scroll the last element into view until the target item is attached.
Ready? Solve the task in the editor
Use Check answer to mark it complete. Hints are there if you need them.
___