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

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)

    the driver type to use

  • *rest

    arguments passed to Bridge.new

Returns:

See Also:



73
74
75
# File 'lib/selenium/webdriver.rb', line 73

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