Copied example from webdriverjs.
Added test from webdriverjs using phantomjs.