530 questions
3
votes
1
answer
74
views
How to correctly pass a data-testid to <AsyncSelect> in react-select for testing?
I am trying to add a stable data-testid to a react-select component (specifically AsyncSelect) so that I can reliably select it in my Playwright E2E tests.
When I try to pass the data-testid prop ...
0
votes
0
answers
45
views
Headlamp e2e tests on Minikube always redirect to /c/<cluster>/login (“Something went wrong with cluster …”)
I’m running Headlamp’s e2e tests locally. The app never shows the cluster chooser and always lands on http://127.0.0.1:50883/c/test/login with a red banner: “Something went wrong with cluster test.” ...
0
votes
0
answers
60
views
Playwright tests cannot be run in Intellij IDEA if it is extended
I want to use fixtures in my project, but when I extend test from Playwright - those tests don't have run button. I referred to the Playwright docs, took their code and just removed some lines to make ...
0
votes
0
answers
136
views
Render OWN turnstile captcha in Playwright correctly
I'm currently writing Playwright tests for a site that uses Turnstile CAPTCHA validation. On our testing systems, the CAPTCHA uses the 'always-pass' site and private keys.
The issue I'm facing is that—...
0
votes
0
answers
67
views
[Playwright]: Worker teardown timeout of 380000ms exceeded
I am using Playwright to test an electron based Theia app, I had my test implemented as follows
import { test, expect} from "@playwright/test";
import { theiaApp } from "../../../...
-1
votes
2
answers
154
views
Playwright ui on Ubuntu doesn't work after update [closed]
After I updated my computer with latest ubuntu, yarn and composer suddenly my playwright test --ui stopped working as it should.
All buttons is hidden and input fields not showing upp, all text in ...
0
votes
0
answers
34
views
Playwright beforeAll() hook opens a new browser for each test despite fullyParallel: false [duplicate]
I am trying to configure my Playwright test suite to run a series of tests within a single browser instance. My goal is to have multiple tests in a single spec file execute continuously in the same ...
0
votes
0
answers
74
views
Playwright soft assertion shows unrelated hortReject TypeError instead of actual assertion error
I’m facing an issue with Playwright’s expect.soft where, if a promise is not resolved, the test continues execution as expected (because of the soft assertion). But at the end of the run, instead of ...
-2
votes
2
answers
287
views
How to initialize Page Object Models in Playwright without beforeEach
I'm working with Playwright and TypeScript and have noticed that Page Object Models (POMs) always require a page parameter for initialization.
Since the page object is only available from the ...
2
votes
1
answer
132
views
How do I export a function that returns a Playwright `expect` object from a typescript module?
I am abstracting some common code that's been copypasted between multiple Playwright projects into a shared library that my team can use across all our test suites. Methods that return Expect ...
1
vote
1
answer
175
views
Playwright test fails on an electron application, but running electron application is working fine
I am facing a bit of a situation.
I have an electron application built with webpack for which I have written tests in the Playwright framework.
Building the electron application with the following ...
0
votes
0
answers
76
views
Playwright storage state preserved in GH runner at next run
I am testing a developer portal. This developer portal is using microsoft MFA enforced login. I'm handling this MFA through the otpauth library. I am also using Playwright's storage state in order to ...
1
vote
3
answers
233
views
Playwright Re-Runs beforeAll and Reseeds Data When a Test Block Fails
We use a feature‐testing approach, where each Playwright test file covers an entire feature from start to finish. In these files, I generate random data (e.g., school name, leader email) at the module ...
1
vote
1
answer
532
views
How to use browser-use to make screenshots for each step and video recording for the whole session?
I am trying to build a python project that uses browser_use to perform tasks, and create video recording for the whole session and screenshots for each step.
But I can't find a way to do it. The ...
1
vote
1
answer
87
views
Allowing playwright project-scoped setup/teardown tests to be excluded from reports and test counts
Is there a way to exclude tests defined in setup/teardown projects from Playwright reports and test statistics — without losing their proper lifecycle execution behavior?
Playwright’s dependencies and ...
-2
votes
1
answer
206
views
Is it possible to run tests in parallel, but first on one project, then on second project?
My goal is to run tests using 2 projects. I can't provide independence between tests on both projects at the same time, so I need to run tests on one project, then on the 2nd.
I tried to make npm ...
1
vote
0
answers
91
views
Playwright not correctly launching Electron app - black window and can't select anything
I've got Playwright installed for my electron app - and it basically looks like whenever I follow the instructions on playwright for how to launch electron - it won't let me take a screenshot. I've ...
0
votes
1
answer
94
views
Electron Playwright Test Hanging due to Flask Backend
I have an Electron app that runs its backend first before opening the first window and closes the backend first before closing the app like:
const { app, BrowserWindow } = require('electron');
const ...
0
votes
1
answer
289
views
Slow Python Async Playwright tests when running with with async_playwright() as p:
New to writing tests in playwright with Python, I am currently attempting to uplift our current TypeScript playwright tests into Python Playwright.
To begin with I have been experimenting with the ...
2
votes
0
answers
82
views
Counting Playwright Tests for Grafana Metrics in Azure CI/CD
I'm working with a Playwright test framework in an Azure CI/CD pipeline and need to track the number of tests created over time for visualization in a Grafana dashboard. Currently, I'm using a ...
1
vote
3
answers
197
views
toBeVisible count of onscreen items
I'm unsure if I've missed something, but I need to:
Check an item is visible on screen (code below which is working)
Do a count on the number of visible items on screen
Originally I was doing:
test(...
1
vote
1
answer
288
views
Playwright targeting mobile browser at a test level
I have a spec file that has a test:
test.describe('mobile', () => {
test.beforeEach(async ({ page }) => {
await page.goto(url);
});
test('Mobile check - (Optimal on desktop / tablet)...
0
votes
1
answer
152
views
How to run Chromium browser with the following args --disable-web-security --user-data-dir=”...”
I want when executing the following command:
playwright codegen demo.playwright.dev/todomvc
I open the browser with the arguments of --disable-web-security --user-data-dir=“...”.
Can this be done? I ...
0
votes
1
answer
342
views
My Playwright test execution hangs after login in GitHub Actions
My Playwright test is running fine in debug and normal mode when I ran on local, but when I've tried the same through GitHub Actions it's hung to launch the application.
My login involves Microsoft ...
0
votes
0
answers
27
views
Connecting to Vertica DB from Playwright script
I am new to playwright (Automation tool).
Scenario: Need to connect to Vertica DB, fetch required record and compare the result with UI values.
I am using following Javascript through which I am able ...
0
votes
1
answer
578
views
Playwright uses old browser version
I'm a bit of a Playwright noob, and I have a problem getting my Python scripts to run using the latest version of Firefox.
Any .py script I run will open in version 95.0. Same thing if I run ...
0
votes
0
answers
67
views
FeatureFlag in Playwright test is being unexpectedly flipped
We use featureFlag values set in projects of playwright.config, for each test folder. This one project is injecting wrong future flag value (expected value is false but we get the error message that ...
1
vote
1
answer
111
views
Redirects https to http
I have the following playwright setup
// playwright.config.ts
export const STORAGE_STATE = 'tests/e2e/storageState.json';
...
projects: [
{
name: 'Log into Wordpress',
testDir: './...
0
votes
1
answer
185
views
Playwright CLI - Exclude specific folder/sub-folder
I have a playwright project that has many sub folders under the tests folder, for example a, b, and c.
In a specific scenario on one of my pipelines I need to exclude the folder c using Playwright CLI....
1
vote
0
answers
182
views
Playwright Launch Persistent Context doesn't work in Docker
Background:
I have a chromium user-data folder which contains a logged-in Instagram account. I want playwright to launch using persistent context from the user-data folder, open Instagram, and take a ...
0
votes
1
answer
131
views
Local storage not found
I got some trouble while I tried to safe a JWT in local storage, which is then used in all tests.
The JWT is used to be send with each action on the page.
I read the docs, but the problems can not be ...
2
votes
1
answer
94
views
Why are my test runner icons on the wrong line, only in certain files?
I have a very specific issue where the icons for starting and stopping tests are shifting depending on when file was created:
In example above, you can see that in example.spec.ts, the icons are on ...
-1
votes
1
answer
155
views
How to share an object in playwright tests
I've a question on sharing the object between tests when a particular test fails.
From the below code, when the "Check Bank account status" fails, PW is unable to successfully run other ...
0
votes
1
answer
294
views
What is the difference between running tests from Playwright extension in VS Code and with CI command
This is my custom fixture which I create for tests:
export const test = base.extend<TestOptions>({
customFixture: [async ({ page, request }, use, testInfo: TestInfo) => {
if(testInfo....
1
vote
1
answer
216
views
Is it possible to loop over a test implementing a different fixture per loop?
I am trying to perform some API testing with Playwright. I have what I thought was a neat solution for handling different users, but now I am not so sure. For each user, I have a fixture:
import { ...
1
vote
0
answers
119
views
Conditionally assign or shard tests to workers
Is it possible to conditionally assign tests to workers somehow?
As an example, I might have 10 tests:
5x that require authentication
5x that do do not require authentication
My project is ...
0
votes
0
answers
279
views
Can I open the File explorer to select a file from the webpage in my playwright tests? I am using Playwright c# with Page Object Model
In my webpage, How do I add a test to open the File Explorer and select a file? I need to use this file to run my playwright tests. I am using Playwright c# with Page Object Model.
I tried:
private ...
0
votes
1
answer
649
views
Running playwright tests with multiple workers
I am looking to run playwright tests (Javascript) using multiple workers in a CI env (I use AWS Batch).
My playwright.config.js file looks like this.
export default defineConfig({
testDir: './...
0
votes
1
answer
296
views
Playwright test based off array running too many times
Absolute novice to Playwright with minimal async experience.
Running the below code ends up creating multiple screen shots (usually between 8-9.)
I understand this is due to the tests running in ...
0
votes
0
answers
80
views
How to simulate map-box rotation ( bearing ) in Playwright E2E test?
I have a React component ( Next JS ) :
"use client"
import { getEnv } from "@/actions/env"
import Layers from "@/features/solar-analytics/panel-installation/map/components/...
6
votes
1
answer
5k
views
How to configure Playwright browsers to trust a custom TLS/SSL server certificate?
I am using Playwright for testing a web application running in an internal test environment where the server is using a TLS/SSL certificate issued by a custom certificate authority (CA). Playwright ...
5
votes
1
answer
437
views
How to execute a playwright component test without the playwright test runner?
I'm interested in trying Component Testing with playwright.
Because of my setup, I cannot use the playwright test runner, so I'd like to produce a Node executable that I can just run.
For regular (non ...
2
votes
3
answers
2k
views
How to make multiple assertion in one line in Playwright?
In Cypress this is easy because I can use .and and I can chain 2 assertion:
checkFields() {
this.heading().should('be.visible').and('contain.text', 'test')
}
But in Playwright I get the error: ...
0
votes
1
answer
187
views
Verifying that a iFrame launched popup with a certain title for a Playwright test
I'm new to automation testing and using playwright. I'm trying to just verify that when I click the print button from my dialog popup. The correct report launches. Everything I have tried is giving me ...
0
votes
0
answers
641
views
I have a component using Popover from shadcn/ui. When I try to testing it with Playwright the locator can´t found the id, how can I resolve?
I have a component using Popover from shadcn/ui. When I try to testing it with Playwright the locator can´t found the id into the Input. I am using React ts. This is a fragment from my component:
<...
0
votes
1
answer
159
views
What is the alternative for serial mode?
I noticed that Playwright documentation advises against using serial mode, stating that it is generally better to keep tests isolated so they can run independently. If serial mode is not recommended, ...
0
votes
0
answers
262
views
ASP.NET Core error when I want to use Playwright
I am trying to create some PDF generator service. For that I would like to use Playwright. I create some test to see is it working, but I got the following error:
Executable doesn't exist at
C:\Users\...
0
votes
1
answer
109
views
run npm scripts in chain even if previous ones failed
When I used ; then it is giving error-
Error: No tests found.
Make sure that arguments are regular expressions matching test files.
You may need to escape symbols like "$" or "*" ...
0
votes
0
answers
204
views
How to use playwright workers in UI automation
There are many talks around using multiple workers in playwright when automating a web application. I've a requirement where I am trying to use X workers for my UI automation.
The application is ...
-2
votes
1
answer
482
views
unit test class with playwright
I have a setup where I can do unit tests with playwright. The setup is (just the important files)
~/folder: ls
sum.js
tests/foo.spec.js
sum.js
function sum(a, b) {
return a + b*2;
}
foo.spec.js
...