Issue 1:
Context

Playwright Version: 1.32.1

Operating System: Windows 11

Node.js Version: v18.14.0

Browser: Firefox

Test Repro

A repro can be found below to reproduce the issue in question. The issue is intermittent, thus the test is contained within a for loop for greater chance of the failure occurring. About 25 iterations will usually yield at least one test that comes across this issue, however should the failure in question not occur, you can increase the chances of the issue occurring by increasing the iteration count or simply rerunning the tests.

FirefoxRepro.zip

The project contains 25 identical tests, wrapped in a for loop and located in the directory: tests > repro.spec.ts. The tests are very simple, consisting of two steps:

Navigate to https://www.google.co.uk/.

Close the page.

Code Snippet

repro.spec.ts

import { test } from '@playwright/test';

test.describe('Repro', async () => {
for (let i = 1; i <= 25; i++) {
test(`Test ${i}`, async ({ page }) => {
await page.goto('https://www.google.co.uk/');
await page.close();
});
}
});

playwright.config.ts

import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
testDir: './tests',
fullyParallel: true,
workers: 5,
timeout: 60 * 1000,
reporter: 'html',

use: {
headless: false,
trace: 'on',
},

projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
],
});

Describe the bug

Firefox intermittently fails when attempting to close the page and browserContext. The page never closes and hangs until eventually hitting the test timeout threshold and consequently failing the test. The repro uses a test timeout of 60 seconds, however the issue occurs with a test timeout of 4 minutes too. This issue only appears to affect Firefox; I am yet to encounter the problem using Webkit and Chromium.

It should be noted that the issue occurs when running tests in parallel. In my case, the project is configured to use 5 workers. I am yet to see the issue when running the tests sequentially.

A screenshot of the report can be found below, which shows the test failing to close the page, as well as the browserContext. My lack of domain knowledge prevents me from being able to produce a trace, as no trace is generated when the test fails for this reason.

Failing Steps Report

Thanks for any help or guidance in advance! This is my first BUG REPORT, so go easy on me should I have missed out any vital information.

Issue 2:
Hi Iam currenlty using Playwright Test Framework with Node.js:

How can i run the below mentioned scripts with RunA & RunB from package.json which is having different cross-env plugin value. Currently the only way iam seeing is to run it differently and generate reports separate. But how can i run both the scripts at the same time and get all the data in one html report only.

System info

Playwright Version: [v1.35]

Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]

Browser: [All, Chromium, Firefox, WebKit]

Other info:

Source code

Scripts:{

Run1:'cross-env plugin=org.CompA npx playwright test feature-a.spec.js',

Run2:'cross-env plugin=org.CompB npx playwright test feature-b.spec.js'

}

Link to the GitHub repository with the repro

[https://github.com/your_profile/playwright_issue_title]