Can we use analytics cookies? They count visits and form use. We run no ads.

AQA Virtual Summit/Meetups

Symon Storozhenko – Automation Testing with Playwright and Python

Published 20 September 2022. Updated with a short answer, key takeaways and a FAQ; the talk text is unchanged. Published by Zapple.Tech, founded by the founders of CodeceptJS and Codeception, open-source testing frameworks.

Watch on YouTube
Short answer

In this talk, Symon Storozhenko gives an overview of Playwright and shows running tests with pytest, reporting, parallel execution and CLI commands. He also covers visual testing and automating Chrome extensions, using MetaMask and OpenSea as the worked example in the presentation.

Key takeaways
  • Overview of Playwright and its main features
  • Running tests with pytest
  • Reporting, parallel execution and CLI commands
  • Visual testing
  • Automating Chrome extensions, with MetaMask and OpenSea

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.

Need a Playwright suite built, repaired or moved to? See our Playwright testing services.

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

Questions about this talk

What is Playwright?

Per Symon Storozhenko's presentation, Playwright is an open-source tool with one API for any browser and any platform. It supports Chromium, WebKit and Firefox, runs on Windows, Linux and macOS, and offers APIs in TypeScript, JavaScript, Python, .NET and Java, with native mobile emulation for Chrome on Android and Mobile Safari.

How does Playwright handle waiting and assertions?

Symon Storozhenko says Playwright waits for elements to be actionable before acting and has introspection events, which removes the need for artificial timeouts, which he names as the primary cause of flaky tests. Its web-first assertions retry automatically until the necessary conditions are met.

What does the talk cover for Playwright with Python?

Symon Storozhenko covers an overview of Playwright, running tests with pytest, reporting, parallel execution and CLI commands, visual testing, and automating Chrome extensions with MetaMask and OpenSea. He is the author of the pytest-playwright-visual package for visual testing with Python.

Request a QA audit quote

Tell us what you ship and what worries you.

What happens after you send this

  1. You send the form: your situation and what you need tested, then your name and work email.
  2. Within one business day, we reply with a suggested first step, its scope, timeline and a quote.
  • Fixed scope
  • You decide after each step
  • The tests live in your repository
  • An NDA signed before access

“They helped us to close the positions and consult our team how to proceed further. High-quality quick feedbacks with the deep checking of the required tasks, professional approach, great understanding of the company's technologies and product, detailed reports.”

Kristina Lavrentieva, Manager at keepgo.com, Israel
  • Rated 4.9 out of 5 on Clutch, from 7 client reviews
  • 42 completed test automation and infrastructure projects
  • Founded by the founders of CodeceptJS and Codeception, open-source testing frameworks

Request a QA audit quote

    What is closest to your situation?
    Optional. The product, the platforms, how often you release, what broke last.

    You decide after our reply whether to go ahead.

    Prefer to talk first? Book a call

    One-week QA audit · written report

    Request a QA audit quote