Issue 1:
System info

Playwright Version: [v1.32.3]

Operating System: [macOS 13.3.1]

Browser: [All]

Source code

I provided exact source code that allows reproducing the issue locally.

Config file

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

export default defineConfig({
baseURL: 'https://example.com/path', // 👈
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], },
},
});

Test file (self-contained)

it('should check the box using setChecked', async ({ page, baseURL }) => {
console.log(baseURL); // 👈 you'll see correct URL here
await page.goto('test');
await expect(page.url()).toBe('https://example.com/path/test'); // 👈 "path" part will be lost here
});

Steps

[Run the test]

Expected

The path should remain; otherwise, it's impossible to test sites deployed to some "prefix folder" without hardcoding that prefix.

Actual

The "path" part is removed when the URL is created for navigation, like page.goto().

Issue 2:
System info

Playwright Version: [v1.32.1]

Operating System: [Windows 10]

Browser: [All, Chromium, Firefox, WebKit]

Other info:

I am running a NodeJs application inside a Docker container and within the application I launch a spawn process through an endpoint which can run all my playwright tests whenever I want in this way:

const pw_test = spawn('npx', ['playwright', 'test', `--config=tests_config_${date}.json`], { env: process.env , shell: true, detached: detach_child_process });

The Docker image is built through a Jenkins Job and the Cointainer is launched/updated with Portainer.

Everything went well for months but as the number of test grew, I thought to a way to speed up my test run. I solved by launching a Persistent Context which I can configure without any problems anymore (see this issue to have an idea of what I am talking about).

What I am experiencing right now is that when I launch my Docker Container in my local machine the tests run and the browser Context close within seconds (or, really, few minutes..) without any problem. Instead, launching tests inside the Container in remote lead the test run to be reeeally slow in execution and the Browser Context takes too long to close. I even get these kind of messages in my reports:

As you can see, I needed to increase the test timeout to 5 minutes but even with this "workaround" the problem still persists..

I also want to add that I checked that during the Chromium instance running there weren't any plug-ins active.

Steps

[Navigate to the URL where my remote Node Application is running]

[Run the test through spawn process]

[Wait for the test to finish]

Expected

The test finish (can fail, success, break) within seconds or 1/2 minutes max (depending on how the test is big)

Actual

The test remains stuck and the browser Context is too slow when closing, running out of time. Consequently, videos are not even recorded (but this is normal, is just to give another proof that the context is not normally close).

Unfortunately I cannot provide any repro for this problem since there are different parts of program that are taking parts here..hope that you guys have any idea of how I can solve this problem..thank you!