Table of Contents
Scope of this presentation
Overview of Playwright tool
Running tests with pytest
Reporting, Parallel execution, CLI commands
Visual Testing
Automating Chrome extensions (MetaMask & OpenSea example)
What is Playwright?
Main features
Open-source
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.
Cross-language. Use the Playwright API in TypeScript, JavaScript, Python, .NET, Java.
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:
Set up numerous automation frameworks in Java, JavaScript and Python using Selenium and Playwright
Author of pytest-playwright-visual package for Playwright visual testing with Python
Created 10k Animated NFT collection using Python
Lecturer on Udemy