You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run this simple test with the --trace=on flag, so you can see the trace network requests:
import{expect,Page,test}from'@playwright/test';test.describe('POC',async()=>{letpage: Page;test.beforeAll(async({ browser })=>{page=awaitbrowser.newPage();// Intercept to see a specific request. Should only log once.awaitpage.route(/redirection\.js/,async(route)=>{console.log(route.request().url());awaitroute.continue();});awaitpage.goto('https://playwright.dev');});test.beforeEach(async()=>{awaitpage.goto('https://google.com/');});// Removing this makes only 2x duplication, instead of 3xtest.afterAll(async()=>{awaitpage.close();});test('should work',async()=>{awaitexpect(page).toHaveTitle(/[a-z]/);});});
Expected behavior
Trace network requests should match the intercepted requests logged... only 1.
Actual behavior
All trace network requests appear to be tripled, even though the intercepted console logs in the test show just one. I don't believe the requests are actually firing 3 times... it just appears that way.
import{Page,test}from'@playwright/test';test.describe('POC',async()=>{letpage: Page;test.beforeAll(async({ browser })=>{page=awaitbrowser.newPage();});test('should work',async()=>{awaitpage.goto('https://playwright.dev');});// This results in the duplicationtest.afterAll(()=>{});test.afterAll(()=>{});test.afterAll(()=>{});test.afterAll(()=>{});});
Version
1.47.2
Steps to reproduce
Run this simple test with the
--trace=on
flag, so you can see the trace network requests:Expected behavior
Trace network requests should match the intercepted requests logged... only 1.
Actual behavior
All trace network requests appear to be tripled, even though the intercepted console logs in the test show just one. I don't believe the requests are actually firing 3 times... it just appears that way.
Additional context
No response
Environment
System:
OS: macOS 14.4.1
Memory: 80.97 MB / 16.00 GB
Binaries:
Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
Yarn: 3.6.1 - ~/.nvm/versions/node/v18.17.1/bin/yarn
npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
playwright: 1.47.2 => 1.47.2
playwright-lighthouse: ^4.0.0 => 4.0.0
The text was updated successfully, but these errors were encountered: