Switch from PhantomJS to Chrome's headless mode
See original GitHub issuePhantomJS 2.5 may never reach the stable state (GitHub milestone shows that it’s 27% complete). Chrome has obviously more stable development team 😉 and leads the improve the web initiative - webp and spdy/http2 to name just a few.
Let’s consider porting phantomas (and rename it to chromas
? 😄 ) to use Chrome (and Firefox) run in a headless mode for performance auditing / monitoring.
Resources
- https://www.chromestatus.com/feature/5678767817097216 (since Chrome 59)
- https://developer.mozilla.org/en-US/Firefox/Headless_mode (since Firefox 55)
- https://chromedevtools.github.io/devtools-protocol/
- https://github.com/ChromeDevTools/debugger-protocol-viewer
- https://github.com/cyrus-and/chrome-remote-interface - sniffing HTTP traffic
- https://medium.com/@marco.luethy/running-headless-chrome-on-aws-lambda-fa82ad33a9eb
- https://www.aymen-loukil.com/en/blog-en/google-puppeteer-tutorial-with-examples/
- https://github.com/ariya/phantomjs/issues/15344 - PhantomJS repository has been archived
- https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-the-chrome-addon-in-the-headless-mode
Libraries
- ~https://github.com/adieuadieu/node-headless-chrome (work in progress, Windows support is missing)~
- https://github.com/GoogleChrome/puppeteer
Puppeteer troubleshooting
Initial work
Is being done in this gist - https://gist.github.com/macbre/fded35f86893bace033e3790079bee76
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:26 (23 by maintainers)
Top Results From Across the Web
Replacing PhantomJS with Headless Chrome in your ...
Headless Chrome is now the browser engine that the tests run against, instead of PhantomJS. This swap "just" replaces the browser with a...
Read more >Replace PhantomJS with Headless Chromium for ...
PhantomJS is a “headless” internet browser, meaning it has no user ... Fortunately, I discovered that switching to Chrome was easy.
Read more >Replacing PhantomJS with headless Chrome
We recently replaced PhantomJS with ChromeDriver for system tests in a project since PhantomJS is no longer maintained.
Read more >Moving your Rails test suite from PhantomJS to Headless ...
Selenium with Chrome accepts quite a number of arguments, so I'll break down a few key ones: headless - this is an obvious...
Read more >Replacing Poltergeist/PhantomJS with Headless Chrome
Replacing Poltergeist/PhantomJS with Headless Chrome ... The Chrome browser supports a headless mode as of version 59, which is a god-send when ...
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
Guys,
It’s been a while since the last activity in this thread. I want to give phantomas a new kick and refactor it to be more modular and use Puppeteer (headless Chromium) instead of PhantomJS (rest in peace, you’ve served us well!).
Here’s my list of ideas, directions, notes:
phantomas-v2
branch I will port modules one by one and make sure tests passmacbre/phantomas-cli
repositorymacbre/phantomas
docker container with CLI tool and reporters installed for an easy deploymentSome basic work has started here - https://gist.github.com/macbre/fded35f86893bace033e3790079bee76#file-script-js
@gmetais - your feedback on what will make your life with YellowLabTools easier are more than welcome here 😃
+1