Is it possible to run puppeteer on electron window?
See original GitHub issueIn nightmare.js, there is a possibility to take advantage of the electron window. That doesn’t require us to use external chromium nor google chrome executables, because chromium is already bundled into electron.
So, can I take an advantage of that? Been slightly looking through docs and found out that puppeteer
always requires to specify the chromium executable path to be used and there seem to be no way to overcome this and work nicely within electron process.
Regards
Issue Analytics
- State:
- Created 4 years ago
- Comments:19
Top Results From Across the Web
puppeteer-in-electron - npm
Run puppeteer within an electron app.. Latest version: 3.0.5, last published: a year ago. Start using puppeteer-in-electron in your project ...
Read more >Using Node.js, Puppeteer and ElectronJS to Create a Web ...
Puppeteer is a pretty cool Node.js library. Developed by the Google Chrome team, it provides you with the tools to easily control a...
Read more >Puppeteer-in-electron NPM - npm.io
Introducing puppeteer-in-electron. Use puppeteer to test and control your electron application. npm install puppeteer-in-electron puppeteer-core electron.
Read more >puppeteer-in-electron - npm Package Health Analysis - Snyk
Is puppeteer-in-electron safe to use? ... The npm package puppeteer-in-electron was scanned for known vulnerabilities and missing license, and no issues were ...
Read more >Automated Testing | Electron
With WebdriverIO · Install the test runner · Connect WDIO to your Electron app · Run your tests.
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
I wrote a small library to take care of this for my own projects: https://www.npmjs.com/package/puppeteer-in-electron
It uses the above webSocketDebuggerUrl approach. This does work in the latest version of puppeteer and electron. Disclaimer, the whole library needs a lot of testing.
The other thing I spent a long time trying to solve was how to associate an electron BrowserWindow with a puppeteer Page. I ended up writing a routine that injects JavaScript into the BrowserWindow and searches for that specific Page in puppeteer.
I would note that there are a few limitations in puppeteer, for example you cannot intercept requests due to electron not supporting the network service.
@AnthoniG If you have the time, would you be able to include a code snippet? I am having trouble with this same task right now