Playwright + Python · Lesson 20 of 37

0/37 done

Module 20: Web Elements

20. Automating Dynamic Tables, Dropdowns & Date Pickers

16 minlesson

Your task

Implement click_row_button(page, order_id, btn_name):

  1. target_row = page.locator("tbody tr").filter(has_text=order_id)
  2. target_row.get_by_role("button", name=btn_name).click()

Write it in the editor, then press Check answer (Ctrl + Enter).

Dynamic Data Grids in Playwright

python
row = page.locator("tbody tr").filter(has_text="ORD-8491")
row.get_by_role("button", name="View").click()

page.get_by_placeholder("Search skills...").fill("Playwright")
page.get_by_role("option", name="Playwright Python").click()

Key Takeaways & Walkthrough Summary

Modern web applications feature rich dynamic widgets: data tables with pagination, searchable multi-selects, and calendars. In this lesson, you will learn robust patterns to automate complex web elements cleanly in Python. Let's tackle rich UI widgets!

Part of the Playwright + Python course (Playwright with Python). Practice this concept live in the Playwright Online Compiler or explore our free automation practice form.

Common Doubts & Lesson Q&A

How do I automate infinite scroll pages in Playwright?

Call page.mouse.wheel(0, 1000) or scroll the last element into view until all records load.

Ready? Solve the task in the editor

Use Check answer to mark it complete. Hints are there if you need them.

Python
Skip