SeleniumHQ/selenium — pull request #8 by kuahyeow (2013-01-29 11:59:05+00:00)
Title: Enhancement #5078 - Allow :desired_capabilities capabilities to be speci...

...fied for PhantomJS so that phantomjs.page.settings.* can be specified

The phantomjs.page.settings.* settings are passed in as part of the Capabilties object, so e.g. we now can change the user-agent like so:

capabilities = Selenium::WebDriver::Remote::Capabilities.phantomjs("phantomjs.page.settings.userAgent" => "Custom Agent/1.0")
Selenium::WebDriver.for :phantomjs, :desired_capabilities => capabilities