question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] How to launch Playwright server without incognito mode

See original GitHub issue

We want to launch the Playwright Server without incognito mode for user to connect to the browser remotely. The playwright server by default launches the browser in incognito mode. And hence, the browser extensions cannot be used in the incognito mode. How can I disable the incognito mode while launching the playwright server? As per I checked from the command used to launch the browser at chrome://version/, it does not contain the --incognito flag, which is used to launch the browser in incognito.

I can set the flag ignoreDefaultArgs: true and pass the required arguments to the args object for launchServer() to launch the browser without incognito mode. Is there any other way for launching the server with persistent context? And why is --incognito not passed to the command while launching the browser in incognito?

@mxschmitt

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
dgozmancommented, Sep 9, 2022

@ankur-lt Thank you for the explanation. This sounds like a possible scenario, but there are no plans to support it for now. I’ll leave this feature request open for further prioritization.

2reactions
ankur-ltcommented, Sep 7, 2022

@dgozman , we want the ability to load extensions and use them in the browser. We are using the launchServer() to launch the Playwright Server, for user to run their tests on the remote machine(https://www.lambdatest.com/support/docs/run-your-first-playwright-test/). This cannot be done in the incognito mode as the extensions are by default disabled in incognito mode. This will require the use of a persistent context(https://playwright.dev/docs/chrome-extensions), but the launchPersistentContext() method does not start the playwright server. So either:

  • launchPersistentContext() method should should accept a param to set the LaunchType to server, or
  • launchServer() should accept a param to start the server with a persistent storage.
Read more comments on GitHub >

github_iconTop Results From Across the Web

[Question] Run playwright in non-incognito chromium mode
Hi,. Is there anyway i can run my test suits file in non-incognito chromium. My case: i have to install the extension in...
Read more >
Python-Playwright,How to start in non-incognito mode?
Try this - playwright.dev/python/docs/api/… You can use 'user_data_dir' to use the saved cookie and session data. Please note that browser ...
Read more >
Answers to All The Top Questions For Playwright Testing
A: No, reporting is typically used on the test runner level. ... Q: Why is the Chromium browser launched in incognito mode?
Read more >
FAQ - TestCafe
General Questions. I have heard that TestCafe does not use Selenium. How does it operate? What is the difference between TestCafe Studio and...
Read more >
How can I test a private or internal server, which is only ...
If your private or internal server is only accessible through VPN or behind a firewall, all you need to do is set up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found