Method: Selenium::WebDriver.for

Defined in:
lib/selenium/webdriver.rb

.for(*args) ⇒ Driver

Create a new Driver instance with the correct bridge for the given browser

One special argument is not passed on to the bridges, :listener. You can pass a listener for this option to get notified of WebDriver events. The passed object must respond to #call or implement the methods from AbstractEventListener.

Examples:


WebDriver.for :firefox, :profile => "some-profile"
WebDriver.for :firefox, :profile => Profile.new
WebDriver.for :remote,  :url => "http://localhost:4444/wd/hub", :desired_capabilities => caps

Parameters:

  • browser (:ie, :internet_explorer, :remote, :chrome, :firefox, :ff, :android, :iphone, :opera)

    the driver type to use

  • *rest

    arguments passed to Bridge.new

Returns:

See Also:



80
81
82
# File 'lib/selenium/webdriver.rb', line 80

def self.for(*args)
  WebDriver::Driver.for(*args)
end