Weird issue happening. I created a test and it passes when running via VS Code using the playwright plugin, but fails when I try to run it via the command line using npx playwright test. how can I check to make sure I am using the same test runner for both ways of execution? Or does anyone have any ideas?
This thread is trying to answer question "Why does a test pass when run via VS Code using the playwright plugin, but fail when run via the command line using npx playwright test, and how can the same test runner be ensured for both methods of execution?"
Error: page.waitForResponse: Page closed at ..\pages\blockEnergyPredictions.ts:58
56 | //});
57 |
58 | const response = await page.waitForResponse(response => { | ^ 59 | return ( 60 | response.url().startsWith('http://website.com/web/v1.0/agency_blocks/') && 61 | response.status() === 200
Retry #1 ─────────────────────────────────────────
Test timeout of 30000ms exceeded.
Error: locator.waitFor: Page closed
This is the code it was trying to execute: const response = await page.waitForResponse(response => { return ( response.url().startsWith('http://xxx.xx.xx.x/web/v1.0/agency_blocks/') && response.status() === 200 ); }, { timeout: 60000 });
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].