playwright-test is the official test runner of playwright and is especially made for end-to-end testing.
Questions tagged [playwright-test]
329 questions
2
votes
2 answers
Playright login to application using global-setup.ts cached session timeouts waiting for selector with DEBUG=0, doesn't timeout with DEBUG=1
*Updates
22.6.2022 / Reproduced the problem with another site that uses OAuth, when the globalSetup should do stuff on the OAuth domain, it fails
21.6.2022 / Trace.zip shows that the url to OAuth login is correct, but the screenshot shows an empty…

ttqa
- 326
- 2
- 12
2
votes
0 answers
Playwright/test: How to authenticate with storageState after base page is loaded using fixtures?
I have faced with a problem and don't understand how to resolve it I'm building UI test solution with Playwright and Playwright/test. The goal is to authenticate with help of storageState
So, what I have for now
global-setup.ts runs from…

Dneprokos
- 43
- 7
2
votes
1 answer
Unable to use the storageState.json inside my tests, received the below error
I am trying to use the StorageState.json to share the authentication details, so that my test case does not have to login to the github everytime when my test case is executed.
Error: tests\githubtests\github.spec.ts:26:8: Playwright Test did not…
2
votes
2 answers
How to avoid "Duplicate test titles are not allowed" error in playwright-test?
Context: In long E2E test flows there are certain steps that are duplicated like moving in-between "Product" vs "shipping" vs "Payment method" tabs in an online order workflow.
Problem: In Playwright-Test, duplicate test titles are not allowed as…

Vishal Aggarwal
- 1,929
- 1
- 13
- 23
2
votes
1 answer
unable to download playwright by the command npx playwright install
Operating System: Windows
Node.js version: v16.14.2
I cannot install playwright through the command 'npx playwright install'. When I typed 'npx playwright install', it started to download browsers, but when it reached 99% it stuck there (like in the…

marcArisen
- 21
- 1
- 3
2
votes
0 answers
playwright: how to get coverage from electron render process
I am rewriting tests for an electron application, replacing spectron/mocha based tests with playwright based tests, using the '@playwright/test' test runner.
The playwright tests are working, but I have problems with getting any coverage data from…

Erling Stage
- 21
- 1
2
votes
2 answers
Playwright Test - Wait for checkbox / radio button state
I currently have an issue where I need to wait for a checkbox / radio button to be "checked" before I proceed with my testing.
If I assert the checkbox is checked the test fails because it doesn't have the checked state immediately after the…

OrdinaryKing
- 411
- 1
- 7
- 16
2
votes
1 answer
Error while trying to run playwright test in headful mode
I am having error while trying to run this simple playwright test. Works fine in headless mode but is giving me trouble while trying to run in headful mode. I might be missing some dependencies??
example.spec.ts
import { test, expect } from…

user9857359
- 57
- 1
- 6
2
votes
1 answer
How do I ignore HTTPS errors for devices in playwright?
I am writing playwright tests and testing them on my local machine, which has SSL but the cert is often giving errors.
I want to ignore all HTTPS-related errors when developing on my local machine. (I will do final testing in the cloud with a valid…

Patrick Kenny
- 4,515
- 7
- 47
- 76
2
votes
0 answers
How to implement Data Driven methods in playwright using playwright/test typescript?
How to implement Data Driven methods in playwright using playwright/test typescript?
How do you get external data(excel or csv) into script and drive multiple iterations with different data sets?

Prasad
- 119
- 1
- 5
- 13
2
votes
2 answers
How to run test suite in parallel but not the single tests
I'm using Playwright.dev to automate our UI tests. Currently I face the following issue:
In a single spec.ts file I have different test suites. Those test suites should run in parallel but not each test. I can not split those test suites into…

stephan.niedermayr
- 51
- 5
2
votes
2 answers
Playwright using JS
I am facing issue with configuration of playwright. Test scenarios is placed under the project directory but during execution it shows no tests found
npm i -D @playwright/test
npx playwright install
Execution : npx playwright test

saurabh bhattacharya
- 39
- 4
2
votes
1 answer
In Playwright, how do I fix the error locator.evaluateAll: Evaluation failed: ReferenceError: _test is not defined?
I'm just getting started with Playwright so I don't know if there is something I'm missing. I do not have any other testing framework wired up to it. I'm using @playwright/test v1.14.1.
This test:
import { test, expect } from…

Chance
- 11,043
- 8
- 61
- 84
1
vote
1 answer
Extending current class with class containing locators of reusable components in playwright
I have a Class A (page object model) of page A. I have a Class B (page object model) of page B and so on...
I have another Class R that doesn't belong a specific page but it has list of locators to some of the reusable components of my…

utkarsh-k
- 836
- 8
- 17
1
vote
0 answers
Correct way of locating same element in a page in playwright that can be located in multiple ways
I have a div element that has some text that I can locate like this -
1. page.getByTestId("parent").getByTestId("list").getByTestId("list-content").getByTestId("leaf-item").nth(1).getByTestId("leaf-item-name");
I can locate the same div in below…

utkarsh-k
- 836
- 8
- 17