Module: Selenium::WebDriver

Defined in:
lib/selenium/webdriver.rb,
lib/selenium/webdriver/ie.rb,
lib/selenium/webdriver/chrome.rb,
lib/selenium/webdriver/iphone.rb,
lib/selenium/webdriver/remote.rb,
lib/selenium/webdriver/android.rb,
lib/selenium/webdriver/firefox.rb,
lib/selenium/webdriver/ie/bridge.rb,
lib/selenium/webdriver/ie/server.rb,
lib/selenium/webdriver/common/keys.rb,
lib/selenium/webdriver/common/wait.rb,
lib/selenium/webdriver/common/alert.rb,
lib/selenium/webdriver/common/error.rb,
lib/selenium/webdriver/common/mouse.rb,
lib/selenium/webdriver/common/proxy.rb,
lib/selenium/webdriver/firefox/util.rb,
lib/selenium/webdriver/chrome/bridge.rb,
lib/selenium/webdriver/common/driver.rb,
lib/selenium/webdriver/common/zipper.rb,
lib/selenium/webdriver/iphone/bridge.rb,
lib/selenium/webdriver/remote/bridge.rb,
lib/selenium/webdriver/android/bridge.rb,
lib/selenium/webdriver/chrome/service.rb,
lib/selenium/webdriver/common/element.rb,
lib/selenium/webdriver/common/options.rb,
lib/selenium/webdriver/firefox/binary.rb,
lib/selenium/webdriver/firefox/bridge.rb,
lib/selenium/webdriver/common/keyboard.rb,
lib/selenium/webdriver/common/platform.rb,
lib/selenium/webdriver/common/timeouts.rb,
lib/selenium/webdriver/firefox/profile.rb,
lib/selenium/webdriver/remote/response.rb,
lib/selenium/webdriver/firefox/launcher.rb,
lib/selenium/webdriver/remote/http/curb.rb,
lib/selenium/webdriver/common/navigation.rb,
lib/selenium/webdriver/firefox/extension.rb,
lib/selenium/webdriver/common/file_reaper.rb,
lib/selenium/webdriver/common/port_prober.rb,
lib/selenium/webdriver/remote/http/common.rb,
lib/selenium/webdriver/firefox/socket_lock.rb,
lib/selenium/webdriver/remote/capabilities.rb,
lib/selenium/webdriver/remote/http/default.rb,
lib/selenium/webdriver/remote/server_error.rb,
lib/selenium/webdriver/common/bridge_helper.rb,
lib/selenium/webdriver/common/socket_poller.rb,
lib/selenium/webdriver/firefox/profiles_ini.rb,
lib/selenium/webdriver/common/action_builder.rb,
lib/selenium/webdriver/common/search_context.rb,
lib/selenium/webdriver/common/target_locator.rb,
lib/selenium/webdriver/remote/http/persistent.rb,
lib/selenium/webdriver/common/driver_extensions/rotatable.rb,
lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb,
lib/selenium/webdriver/common/driver_extensions/has_input_devices.rb

Defined Under Namespace

Modules: Android, BridgeHelper, Chrome, DriverExtensions, Error, FileReaper, Firefox, IE, IPhone, Keys, Platform, Remote, SearchContext, Zipper Classes: ActionBuilder, Alert, Dimension, Driver, Element, Keyboard, Mouse, Navigation, Options, Point, PortProber, Proxy, SocketPoller, TargetLocator, Timeouts, Wait

Class Method Summary collapse

Class Method Details

.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

.rootObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



45
46
47
# File 'lib/selenium/webdriver.rb', line 45

def self.root
  @root ||= File.expand_path(File.join(File.dirname(__FILE__), ".."))
end