datasift/storyplayer — pull request #43 by stuartherbert (2013-08-12 23:47:59+00:00)
Title: New: support for browsers other than chrome

This PR adds initial support for using web browsers other than Chrome. Chrome remains the default web browser, for backwards-compatibility reasons.

* New: environments.defaults.webbrowser config setting (accepts: chrome, firefox, phantomjs)
* New: --web-browser switch for play-story command (accepts: chrome, firefox, phantomjs)
* Updated: relies on datasift/webdriver 1.4.1 or later

Tested with Chrome, Firefox, and PhantomJS on OSX. Hasn't been tested on Linux yet.

PhantomJS support has the following caveats:

* You have to start vendor/bin/selenium-server-hub.sh, NOT selenium-server.sh, and once selenium has bootstrapped (time varies on how quick your machine is), then run vendor/bin/phantomjs.sh
* At the moment, PhantomJS sessions persist between stories. This appears to be a bug in PhantomJS / GhostDriver. Makes it utterly useless for testing with (for now).
* At the moment, we're not detecting the capabilities of Selenium, which makes our code less robust than it should be. We need to poke through Selenium's API and find a way to ask it which browsers it supports, so that we can provide much better feedback to the user. This can be done as a separate PR in the future.

This PR is a (small) step towards supporting SauceLabs (which is our long-term goal).