Skip to main content

All Questions

2 votes
1 answer
1k views

How to fix flaky test on Playwright?

Hi I have this app that I'm testing. The app itself will fill the value and click the button to provide the data on table. However, in reality it takes more than 40 seconds to load the data itself so ...
Chukchak's user avatar
0 votes
0 answers
128 views

Why always my last e2e test on order fails in playwright?

After long running my test , i saw that my last test on order always flaky and when my flacky test run second time it pass. I was thinking my test are not written correctly, but when I change the ...
sayinmehmet47's user avatar
0 votes
2 answers
180 views

Where to locate E2E tests relies on more than one repository

This topic does not seem to have any best-practice documentation. I maintain two main repositories: The MainRepository1, the MainRepository2. Four E2E tests were created to be executed every time each ...
OmerHanan's user avatar
1 vote
1 answer
40 views

Is there any Playwright equivalent for waitForResource in CasperJS?

Is there any Playwright equivalent for waitForResource in CasperJS? How can I write the below code using Playwright? casper.waitForResource(function test(resource) { return resource.url.indexOf(&...
sumercetin's user avatar
6 votes
0 answers
2k views

Playwright - Cookies not set from storageState file from different domains in Chromium

Concept I'm using the concept of reusing the authentication state via storageState file in Playwright. Following is my code snippet spread across different files: Code playwright.config.json import ...
Srishti Gupta's user avatar
2 votes
1 answer
1k views

equivalent to soft assertion for locators in playwright

I have a test that I want to continue even if a locator call fails. I know about soft assertions, and they work as expected for my use case, but is there an equivalent for page.locator().someMethod()? ...
saylestyler's user avatar
0 votes
3 answers
4k views

How to fix assertion error using playwright?

I'm using playwright to do e2e testing to check if the email is exists or not, and while I run my tests its said : "Finished test flow with status passed" But its show me that the test is ...
Ndor's user avatar
  • 19
3 votes
1 answer
3k views

Mocking back-end 3rd-party calls in Sveltekit + Playwright

This is a fairly high-level question regarding design patterns/best practices when developing end-to-end tests in SvelteKit+Playwright: What is the recommended way of ensuring that any back-end code ...
Kyle L.'s user avatar
  • 315
0 votes
1 answer
6k views

How in Playwright get in evaluate data from arguments?

How in Playwright get in evaluate data from arguments? page.evaluate: ReferenceError: d is not defined async function testEv(d) { const data = await this.page.evaluate(function() { console.log('...
rd100's user avatar
  • 1
1 vote
1 answer
2k views

How to check viewport before running the test

I have this config in playwright to run different browsers for the same test const config: PlaywrightTestConfig = { projects: [ { name: "Desktop Safari", use: { ...
Jorgio's user avatar
  • 111