Skip to content

[Feature]: Add option to prevent opening in browser when ui-host or ui-port specified #31777

Open
@philippdieter

Description

@philippdieter

🚀 Feature Request

A new option for the 'npx playwright test' command, which allows to suppress opening the ui in the browser or launching a new browser. The new option could be named '--ui-nolaunch' for example.

Example

Running the command in the terminal on remote systems which ports are accessed via forwarding or some other means.
npx playwright test --ui-port 9323 --ui-nolaunch

Motivation

I run playwright on a remote machine which I access via a browser which connects to a socks proxy on said remote machine. Also X11 forwarding is enabled for several reasons. So everytime I run the test command a browser on the remote machine will launch and show up on my local machine. For a quick fix I commented out the _server.openTraceInBrowser function call but I would really like to see a permanent solution for this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions