I recently noticed the new Google Chrome project Puppeteer:
Puppeteer is a Node library which provides a high-level API to control headless Chrome or Chromium over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome or Chromium.
As someone who only runs WebDriver tests in Google Chrome anyway, this looks like a promising project that bypasses WebDriver to have full programmatic control of Google Chrome including for automated end-to-end (e2e) tests.
The thing I really love about this is no Chromedriver dependency and how installing the library installs Chromium by default which can be controlled headlessly with zero config or any other dependencies.
You can even develop scripts using this playground.
I set up a (very basic) demo project that uses Mocha + Puppeteer and it runs on CircleCI with zero config. Awesome.
When running Selenium WebDriver scripts against the latest version of Chrome (57) it shows a save password prompt that hasn’t appeared previously whilst using Chromedriver, as far as I know.
Continue reading “Save password prompts in Chrome 57 with WebDriver”
Chromedriver/Chrome is pretty great at executing WebDriverJs scripts without taking away your focus (so you can execute them in the background whilst doing other things), the one exception I found was selecting items in a select list. I found it would do this:
Continue reading “WebDriverJs Select Lists in Chrome”
It’s a long story (for another time) but I recently had to start using the Adblock Plus Chrome extension whilst running our automated e2e tests.
Continue reading “Using Chrome Extensions with WebDriverJs”
If you’re using Chrome to run your WebDriver tests and are wondering why the screenshots don’t show the fully rendered page (including below the fold), here’s your answer.
Continue reading “Need fully rendered WebDriver screenshots? Use Firefox”
GhostDriver has been released which means it is now easy to run reliable headless WebDriver tests on Mac OSX.
Steps to get working on OSX
- First make sure you have homebrew installed
brew install phantomjs
which should install PhantomJS 1.8.1 or newer
- Run irb and start using GhostDriver!
b = Watir::Browser.new :phantomjs
And yes, in case you’re wondering, it does screenshots!