That would be so awesome. The current alternatives:
1. Use PhantomJS: It easy to script, but it lags over real browser by few years and development is stagnant. Many real website doesn't work in PhantomJS.
2. Use Chrome/Firefox xvfb. You have real browser, but scripting is hard. E.g. even hello world examples like make a thumbnail of a website takes a lot of time to get right.
According to some rumors, headless Chrome existed before even Chrome was released to the public. Google use it to do web scraping. However, though headless browsers are great for developers, they are also great for spammers and ad fraud. So the main developer likely has conflict of interests whether to invest resources into making headless Chrome public.
There's also Nightmare, which is built off Atom. We ported all of our PhantomJS-backed headless tests to Nightmare recently, and it's paid in dividends: http://www.nightmarejs.org
headless: Implement screenshot capturing
(based on patch from skyostil@, also sets default window
size to 800x600 to enable basic snapshot support)
With the --screenshot option, headless shell will save a
PNG screenshot of the loaded page.
I do to, but not for testing (we don't actually do any scripted UI tests, we should, but they are time consuming to write). We have a Python service that uses Firefox, Selenium and XVFB (through the awesome PyVirtualDisplay library, check it out) to log into a website that uses an annoying Java applet + scripting for authentication. This ended up cutting off a huge headache where previously we were doing this in a Windows scheduled task that needed an active console session to do anything.
This is great news. In general I'm hoping this makes it easier to do browser testing in more CI services, rather than isolating this type of testing to services that have to specialize in it just to get it to to work.
One (minor?) benefit over Phantom is having working file uploads, though it would be awesome to have that in Phantom too.
We upload files in our integration tests using PhantomJS. At least, I'm pretty sure we do (we use Capybara to drive PhantomJS). Am I missing something?
I use the Chrome and Firefox docker-selenium containers in Testcontainers [1][2], my project for running containers to support JUnit tests.
I created this after numerous issues with PhantomJS compatibility and debuggability; Testcontainers instead uses the real browsers, and also offers automatic video recording of test sessions and VNC access for debugging.
Headless chrome support sounds like a good step forward, but if visibility into what's going on is limited then I feel there's going to be some way to go. Perhaps chrome remote debugging support?
I believe the difference is that chromedriver still spins up all the normal chrome interface, which wouldn't be needed for the headless chrome. I think the stated deliverables help discern the intention:
1. A library which headless applications can link to to.
2. A sample application which demonstrates the use of headless APIs.
[+] [-] jakozaur|9 years ago|reply
1. Use PhantomJS: It easy to script, but it lags over real browser by few years and development is stagnant. Many real website doesn't work in PhantomJS.
2. Use Chrome/Firefox xvfb. You have real browser, but scripting is hard. E.g. even hello world examples like make a thumbnail of a website takes a lot of time to get right.
According to some rumors, headless Chrome existed before even Chrome was released to the public. Google use it to do web scraping. However, though headless browsers are great for developers, they are also great for spammers and ad fraud. So the main developer likely has conflict of interests whether to invest resources into making headless Chrome public.
[+] [-] m0th87|9 years ago|reply
[+] [-] robin_reala|9 years ago|reply
[1] http://slimerjs.org/
[+] [-] fauigerzigerk|9 years ago|reply
I'm using a Chrome plugin for that purpose, which complicates the whole setup even further.
[+] [-] est|9 years ago|reply
[+] [-] andrea_s|9 years ago|reply
[+] [-] ddebernardy|9 years ago|reply
[+] [-] juliangamble|9 years ago|reply
[+] [-] frik|9 years ago|reply
[+] [-] hkjgkjy|9 years ago|reply
[+] [-] jsprogrammer|9 years ago|reply
[+] [-] snuxoll|9 years ago|reply
[+] [-] joshschreuder|9 years ago|reply
[+] [-] mhluongo|9 years ago|reply
[+] [-] egeozcan|9 years ago|reply
[+] [-] emilong|9 years ago|reply
One (minor?) benefit over Phantom is having working file uploads, though it would be awesome to have that in Phantom too.
[+] [-] toasterlovin|9 years ago|reply
[+] [-] juliangamble|9 years ago|reply
[+] [-] killing_time|9 years ago|reply
I created this after numerous issues with PhantomJS compatibility and debuggability; Testcontainers instead uses the real browsers, and also offers automatic video recording of test sessions and VNC access for debugging.
Headless chrome support sounds like a good step forward, but if visibility into what's going on is limited then I feel there's going to be some way to go. Perhaps chrome remote debugging support?
[1]: http://testcontainers.viewdocs.io/testcontainers-java/ [2]: https://rnorth.org/26/better-junit-selenium-testing-with-doc...
[+] [-] fuzionmonkey|9 years ago|reply
[+] [-] erikb|9 years ago|reply
[+] [-] gildas|9 years ago|reply
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=85323
[+] [-] shimon_e|9 years ago|reply
[+] [-] foota|9 years ago|reply
1. A library which headless applications can link to to. 2. A sample application which demonstrates the use of headless APIs.
[+] [-] qznc|9 years ago|reply
[+] [-] myle|9 years ago|reply
[+] [-] shanemhansen|9 years ago|reply