Distinct options for every new browser instance
See original GitHub issueHi!
First of all: Very beautiful code and software. I should start learning typescript.
Is it possible to pass different options to different browser launches?
As I can see in the concurrency implementation of CONCURRENCY_BROWSER
in src/concurrency/built-in/Browser.ts
, every new browser is started with identical options:
let chrome = await this.puppeteer.launch(this.options) as puppeteer.Browser;
Would it be possible to pass different options to new launches of browser instances?
I ask because I want to set different --proxy-server=some-proxy
flags to new browser launches.
Thanks for viewing
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Puppeteer launch multiple instances with unique data?
Basically, in one point of my script I tell the browser to close the tab and reopen a new one. It closes each...
Read more >Opening Links in New Browser Windows and Tabs
New windows or tabs can cause disorientation, with users often not realizing that a new window or tab has opened.
Read more >Observations running 2 million headless sessions
Each new browser instance gets a clean --user-data-dir (unless otherwise specified), which means it's treated as a fresh session entirely.
Read more >How to Set Up A Different Proxy for Each Tab - Ghost Browser
You can select the 'Next proxy in list' option to tell Ghost to do this at the tab or Identity level. If you...
Read more >Window.open() - Web APIs - MDN Web Docs
Users may use browser built-in features or extensions to choose whether to open a link in a new window, in the same window,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok I managed to do this myself.
here is the test case:
here is the diff:
Thanks for the great module!
Is this possible yet? I need to set a different http proxy per browser instance.
Could some kind of event not be fired beforeLaunch or something like that, then we can configure each browser/page instance.
This use case would not work for my application as I need to dynamically queue tasks every X mins to the cluster object that are fetched from a server.
Thanks