Table of Contents
Scope of this presentation
Overview of Playwright tool
Running tests with pytest
Reporting, Parallel execution, CLI commands
Automating Chrome extensions (MetaMask & OpenSea example)
What is Playwright?
Any browser • Any platform • One API
Cross-browser. Playwright supports all modern rendering engines including Chromium, WebKit, and Firefox.
Cross-platform. Test on Windows, Linux, and macOS, locally or on CI, headless or headed.
Test Mobile Web. Native mobile emulation of Google Chrome for Android and Mobile Safari. The same rendering engine works on your Desktop and in the Cloud.
Auto-wait. Playwright waits for elements to be actionable prior to performing actions. It also has a rich set of introspection events. The combination of the two eliminates the need for artificial timeouts – the primary cause of flaky tests.
Web-first assertions. Playwright assertions are created specifically for the dynamic web. Checks are automatically retried until the necessary conditions are met.
Multiple everything. Test scenarios that span multiple tabs, multiple origins and multiple users. Create scenarios with different contexts for different users and run them against your server, all in one test.
About Symon Storozhenko:
Author of pytest-playwright-visual package for Playwright visual testing with Python
Created 10k Animated NFT collection using Python
Lecturer on Udemy