RSSAmplifier

Blog

Playwright Solutions

Curated Selection of Playwright Automated Test Problems and Solutions

playwrightsolutions.comRSS feed ↗15 posts

Latest posts

TOOL: Playwright-Cli-Select For Quick Targeted Test Runs via CLI

Have you ever struggled to run specific tests from the command line? I've had the want to run 2-3 tests from the command line together and struggled to autocomplete my way through building the proper command manually. Good News Everybody With this new tool I don'

TIP: Playwright Trace Viewer - Copy as Playwright API Request

With the latest 1.50 Playwright release, there was a really nice feature that was released that will help speed up test automation api requests. The feature is found on the Playwright Trace Viewer which is found in Playwright UI mode or the HTML test report. From Playwright Test Report

How to Run a Specific Spec File in Playwright Tests Sequentially

If you've ever been in a scenario where a test you were writing changed the state of the system or user in a way where other tests would fail? This solution may help you. While I am a big fan of running my tests at the same time

End of 2024 Announcements

I wanted to share a few exciting announcements here and via the newsletter! I'm a Linked In Learning Instructor. At the end of November the " Learning Playwright " Course that I've been working on the last few months was released. I've been given

Playwright Login Test With Two Factor Authentication (2FA) Enabled (TOTP)

This week I'll walk through a Playwright Test with 2FA enabled. 2FA or Two Factor Authentication is a common recommended security measure to protect users accounts across the internet. Having a way to test this functionality in your CI/CD pipelines within your Playwright tests can ensure that

Playwright Solutions Challenge: Debug and figure out why the video recording isn't in the HTML report?

A few weeks back I was approached with a playwright challenge. The challenged seemed like an easy one to solve but I was surprised with the solution, so much so I wanted to share it here and give you a chance to exercise your debug skills. The Challenge 🎯 The

[Update v1.46] Is it possible to run only Playwright Tests that changed in GitHub actions on a pull request?

Good news everyone! This is now possible to do without any external scripts. It is all baked into the Playwright CLI . Original solution If you've been subscribed for some time you may have remembered the original solution. It included getting a list of the file names by running

How Do I Combine Playwright HTML Reports After Running Multiple Playwright Commands?

A Fun Challenge I recently had someone reach out to me with this question. They wanted to run a set of tests with 3 workers and then a separate test run with  with 1 worker and the command looked something like this. npx playwright test --grep-invert @api --workers=

How Do You Scroll To The Bottom Of An Infinite Scrolling Page In A Playwright Test?

This week our team had a renewed focus on addressing some of our flakey tests, and one of the things we ran across was an interesting page interaction. We wanted to utilize our drop down to limit the amount of responses within a page. The options for filtering  are

How To Load a Custom Test Fixture or Setup Projects When Running Playwright Test Code Generator

I'm a big fan of the Playwright Test Generator when I first start writing tests. I find the tool very useful to quickly identify useful locators/selectors, and quickly generate some test code and assertions from recording my manual actions through a website. Though the code isn'

How To Use Playwright's testInfo.retry To Deal With Flakey Environments

The environment I am working with can be unstable sometimes. To ensure I don't have false negative tests, I need to rerun the failed checks. Playwright makes this easy by allowing you to pass --retries followed by the number of retries. Skipping certain tests if retried The problem

A Few Thoughts On Flakey Tests

When a new test automation project starts there are really 3 buckets of work that happen. building (creating new tests) , maintaining (updating existing tests as the application changes), and monitoring (keeping an eye on automation runs, investigating failures and surfacing findings to the team). "Flakey" tests really come

How To Run Failures Only From The Last Playwright Run Via CLI

Hello Playwright 1.44 release! With this release we now have official support to run failures only from the last playwright run. 💡 TLDR; npx playwright test --last-failed Previous Solution Last year I created the json summary reporter and a bash script that can be found in the article

In-Depth Review of Playwright Dashboard by Currents

In this guide I'll be sharing my experiences using the Playwright Dashboard by Currents with my Playwright Solutions projects I've built over the years. This article is sponsored but I was given the liberty of sharing my honest experiences with the platform. All of my examples

👀 Playwright Indent List Reporter

Do you ever find the need to 🌶️ up your command line interface? Well good news Syzana Bicaj , has released a npm package that allows you to customize your colors but also to indent the spec files in your terminal for easy reading! In order to install the package