inflearn logo

Python Playwright Browser Automation and Testing: 60 Lessons

This course walks through browser automation with Playwright for Python, from the basic structure to locators, network control, asynchronous scraping, pytest testing, debugging, accessibility snapshots, and MCP architecture. Using a fictional internal platform as an example, it explores each feature with code and diagrams, explaining why it works the way it does and when to choose each approach.

1 learners are taking this course

Level Basic

Course period Unlimited

Python
Python
Web Crawling
Web Crawling
pytest
pytest
Model Context Protocol
Model Context Protocol
Python
Python
Web Crawling
Web Crawling
pytest
pytest
Model Context Protocol
Model Context Protocol

What you will gain after the course

  • You can understand the Browser·Context·Page structure and how auto-waiting works, and choose robust locators centered on get_by_role. (Lessons 1–8)

  • You can handle tricky browser scenarios such as preserving login state, new tabs, iframes, Shadow DOM, and emulation. (Lessons 9–16)

  • You can handle input, selection, dragging, dialogs, uploads, downloads, infinite scrolling, screenshots, and PDF output with code. (Lessons 17–24)

  • You can observe, block, modify, and mock network requests using route, expect_response, HAR, and API request contexts. (Lessons 25–32)

  • You can build an asynchronous scraper that combines async_playwright with a Semaphore, retries, data cleaning, and SQLite storage. (Lessons 33–40)

  • You can write tests using pytest-playwright fixtures, expect assertions, and the Page Object Model, and trace the cause of failures with Trace Viewer. (Lessons 41–52)

Recommended for
these people

Who is this course right for?

  • A developer who knows basic Python syntax and is looking to properly learn browser automation for the first time.

  • A QA engineer looking to organize web UI tests with pytest and Playwright

  • For those looking for an alternative because their existing Selenium scripts often hang.

  • For anyone interested in how browsers are connected to AI agents (accessibility snapshots, MCP)

Need to know before starting?

  • You just need to know basic Python syntax, such as variables, conditional statements, functions, and `with` statements.

  • A basic understanding of HTML tags and web page structure is required.

Hello
This is catgpt

Career Verified

A through-and-through AI researcher, 'CatGPT', who busted their ass reading papers and fine-tuning models. Then one day, a bolt-from-the-blue mission landed in their lap: "You’ve finished building the model, right? Now write the front end and back end too so we can deliver it to the client."

To survive, I was forced to make a tearful career change into a full-stack developer. After successfully delivering the solution and making it back, AI had advanced so much that this time, instead of coding, I found myself taking on the role of a PM coordinating a team with AI...!

Not stopping there, this max-level engineer went all in and poured their full-stack soul into building a “lecture production automation pipeline” and even bringing an “AI instructor” to life. What fate awaits CatGPT, the full-stack AI engineer who has automated even their own livelihood(?)!

More

Curriculum

All

60 lectures ∙ (8hr 39min)

Published: 
Last updated: 

Reviews

Not enough reviews.
Please write a valuable review that helps everyone!

catgpt's other courses

Check out other courses by the instructor!

Similar courses

Explore other courses in the same field!

Limited time deal

$34.10

27%

$47.30