class Selenium::WebDriver::PhantomJS::Bridge
@api private
Public Class Methods
new(opts = {})
click to toggle source
Calls superclass method
# File lib/selenium/webdriver/phantomjs/bridge.rb, line 9 def initialize(opts = {}) http_client = opts.delete(:http_client) caps = opts.delete(:desired_capabilities) { Remote::Capabilities.phantomjs } if opts.has_key?(:url) url = opts.delete(:url) else args = opts.delete(:args) || caps['phantomjs.cli.args'] port = opts.delete(:port) @service = Service.default_service(port) @service.start(args) url = @service.uri end remote_opts = { :url => url, :desired_capabilities => caps } remote_opts.merge!(:http_client => http_client) if http_client super(remote_opts) end
Public Instance Methods
browser()
click to toggle source
# File lib/selenium/webdriver/phantomjs/bridge.rb, line 35 def browser :phantomjs end
capabilities()
click to toggle source
# File lib/selenium/webdriver/phantomjs/bridge.rb, line 46 def capabilities @capabilities ||= Remote::Capabilities.phantomjs end
driver_extensions()
click to toggle source
# File lib/selenium/webdriver/phantomjs/bridge.rb, line 39 def driver_extensions [ DriverExtensions::TakesScreenshot, DriverExtensions::HasInputDevices ] end
quit()
click to toggle source
Calls superclass method
# File lib/selenium/webdriver/phantomjs/bridge.rb, line 50 def quit super ensure @service.stop if @service end