playwright-test is the official test runner of playwright and is especially made for end-to-end testing.
Questions tagged [playwright-test]
329 questions
0
votes
0 answers
How to timeout a refresh page if element not visible
I managed to add a script below to refresh the page if an element is not visible using automation script, and this works but I want it to stop refreshing after a period of time e.g 20 seconds or a number of times if the element is not visible so the…

hm9
- 37
- 8
0
votes
1 answer
Is it possible to create modular tests with playwright?
I'm trying to make tests for a webapplication with Playwright test in JavaScript, but I would like to make them modular, to avoid repeating code. Let's say two tests need to fill a form. Instead of writing code to fill the form in both tests, is it…

Dries
- 11
- 2
0
votes
1 answer
playwright expect command is not working with playwright
i need some help with playwright and cucumber
i set up a gherkin and some tests for it, but i have problems with the expect command.
here are my imports:
import { ICustomWorld } from "../support/custom-world";
import { Given, When, Then } from…

KiritoNG
- 1
- 3
0
votes
1 answer
The term “URL=Test.com” is not recognized
I have the following in my test file. I’m trying to use env variables on my scripts then send the value thru commandline.
const MYURL = process.env.URL;
console.log(MYURL)
In the commandline when I run the following:
URL=Test.com npx playwright…

Dovahkiin
- 1
- 1
0
votes
0 answers
attaching screenshot to allure report using playwright
How might I be able to attach screenshot to allure report using MS Playwright
test('basic test', async ({ page }) => {
await page.goto('https://playwright.dev/');
const screen1 = await page.screenshot({path:…

user5199
- 359
- 2
- 15
0
votes
1 answer
Playwright not displaying Alert Message
My application triggers an alert notification after submitting a request and I would like to capture the alert message in the notification using playwright. I have tried the following but still it does not work, Any help here would be…

Rikki
- 1
- 2
0
votes
1 answer
unable to view the playwright docker test execution through VNC viewer
I am trying to execute the script in mcr.microsoft.com/playwright:bionic docker container .
I have exposed the port 5900 as shown below but unable to connect to host when i tried with the vnc viewer localhost:5900. I can able to view other docker…

SUBRAMANIA SIVA
- 51
- 3
-1
votes
0 answers
Can't use Playwright with for loop neither using @test/Playwright to get data
I have a list of website about 1000 when I tried to make Playwright scrape this array with a for loop it stops after the first link but brings me the data I need.
const scrapeCrunchbaseWebsite = (async () => {
console.log(crunchbaseData);
var…

Steven
- 15
- 4
-1
votes
0 answers
After adding "Import" to testing file, "Inspect" run plugin disappears [Playwright]
I usually run tests with inspect, but when I add an Import in my test file, "Run", "Debug", " Inspect"
"Execute Playwright test", everything disappears and only stays "Execute Playwright test", does somebody knows what is the…

Mrljes
- 1
-1
votes
0 answers
Issue with --video=retain-on-failure in pytest-playwright
I'm facing an issue while using the "--video=retain-on-failure" option with pytest-playwright. My intention is to record videos only for failed test cases and do not store video recording for successful test cases. However, even when all tests pass…

Subasri sridhar
- 809
- 5
- 13
-1
votes
3 answers
Playwright Java : Playwright fails to click on element whose property is set hidden
I tried many locators but looks like its hidden so playwright fails to click any workaround please help

sumit goyal
- 35
- 1
- 7
-1
votes
2 answers
playwright test website with Keycloak, can't find a way to logIn via pageObjectModel
Hi (i am pretty new in palywright),
I need/want to find a way in playwright, to login via pageObjectModel in a aplication which uses keycloak, but I don't know how.
I found a way without pageObject, to logIn in first test and saving the auth in…

Angel Lopez
- 35
- 1
- 5