### Home Classes Methods

### In Files

- lib/selenium/webdriver.rb
- lib/selenium/client.rb
- lib/selenium/rake/server_task.rb
- lib/selenium/server.rb
- lib/selenium/client/errors.rb
- lib/selenium/client/javascript_frameworks/prototype.rb
- lib/selenium/client/javascript_frameworks/jquery.rb
- lib/selenium/client/idiomatic.rb
- lib/selenium/client/protocol.rb
- lib/selenium/client/driver.rb
- lib/selenium/client/selenium_helper.rb
- lib/selenium/client/javascript_expression_builder.rb
- lib/selenium/client/base.rb
- lib/selenium/client/extensions.rb
- lib/selenium/client/legacy_driver.rb
- lib/selenium/webdriver/ie/server.rb
- lib/selenium/webdriver/ie/bridge.rb
- lib/selenium/webdriver/safari/bridge.rb
- lib/selenium/webdriver/safari/server.rb
- lib/selenium/webdriver/safari/browser.rb
- lib/selenium/webdriver/safari/extension.rb
- lib/selenium/webdriver/chrome/service.rb
- lib/selenium/webdriver/chrome/profile.rb
- lib/selenium/webdriver/chrome/bridge.rb
- lib/selenium/webdriver/safari.rb
- lib/selenium/webdriver/opera/bridge.rb
- lib/selenium/webdriver/opera/service.rb
- lib/selenium/webdriver/android/bridge.rb
- lib/selenium/webdriver/remote/response.rb
- lib/selenium/webdriver/remote/server_error.rb
- lib/selenium/webdriver/remote/bridge.rb
- lib/selenium/webdriver/remote/capabilities.rb
- lib/selenium/webdriver/remote/http/curb.rb
- lib/selenium/webdriver/remote/http/persistent.rb
- lib/selenium/webdriver/remote/http/common.rb
- lib/selenium/webdriver/remote/http/default.rb
- lib/selenium/webdriver/android.rb
- lib/selenium/webdriver/firefox/profile.rb
- lib/selenium/webdriver/firefox/binary.rb
- lib/selenium/webdriver/firefox/util.rb
- lib/selenium/webdriver/firefox/profiles_ini.rb
- lib/selenium/webdriver/firefox/socket_lock.rb
- lib/selenium/webdriver/firefox/bridge.rb
- lib/selenium/webdriver/firefox/extension.rb
- lib/selenium/webdriver/firefox/launcher.rb
- lib/selenium/webdriver/phantomjs/service.rb
- lib/selenium/webdriver/phantomjs/bridge.rb
- lib/selenium/webdriver/phantomjs.rb
- lib/selenium/webdriver/iphone/bridge.rb
- lib/selenium/webdriver/ie.rb
- lib/selenium/webdriver/iphone.rb
- lib/selenium/webdriver/common/wait.rb
- lib/selenium/webdriver/common/options.rb
- lib/selenium/webdriver/common/log_entry.rb
- lib/selenium/webdriver/common/action_builder.rb
- lib/selenium/webdriver/common/bridge_helper.rb
- lib/selenium/webdriver/common/navigation.rb
- lib/selenium/webdriver/common/file_reaper.rb
- lib/selenium/webdriver/common/profile_helper.rb
- lib/selenium/webdriver/common/target_locator.rb
- lib/selenium/webdriver/common/driver.rb
- lib/selenium/webdriver/common/json_helper.rb
- lib/selenium/webdriver/common/html5/local_storage.rb
- lib/selenium/webdriver/common/html5/session_storage.rb
- lib/selenium/webdriver/common/html5/shared_web_storage.rb
- lib/selenium/webdriver/common/socket_poller.rb
- lib/selenium/webdriver/common/mouse.rb
- lib/selenium/webdriver/common/keyboard.rb
- lib/selenium/webdriver/common/keys.rb
- lib/selenium/webdriver/common/touch_screen.rb
- lib/selenium/webdriver/common/alert.rb
- lib/selenium/webdriver/common/platform.rb
- lib/selenium/webdriver/common/search_context.rb
- lib/selenium/webdriver/common/zipper.rb
- lib/selenium/webdriver/common/proxy.rb
- lib/selenium/webdriver/common/element.rb
- lib/selenium/webdriver/common/driver_extensions/has_session_id.rb
- lib/selenium/webdriver/common/driver_extensions/uploads_files.rb
- lib/selenium/webdriver/common/driver_extensions/has_browser_connection.rb
- lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb
- lib/selenium/webdriver/common/driver_extensions/has_input_devices.rb
- lib/selenium/webdriver/common/driver_extensions/has_web_storage.rb
- lib/selenium/webdriver/common/driver_extensions/has_location.rb
- lib/selenium/webdriver/common/driver_extensions/rotatable.rb
- lib/selenium/webdriver/common/driver_extensions/has_touch_screen.rb
- lib/selenium/webdriver/common/port_prober.rb
- lib/selenium/webdriver/common/timeouts.rb
- lib/selenium/webdriver/common/window.rb
- lib/selenium/webdriver/common/touch_action_builder.rb
- lib/selenium/webdriver/common/error.rb
- lib/selenium/webdriver/opera.rb
- lib/selenium/webdriver/firefox.rb
- lib/selenium/webdriver/chrome.rb
- lib/selenium/webdriver/support/event_firing_bridge.rb
- lib/selenium/webdriver/support/color.rb
- lib/selenium/webdriver/support/select.rb
- lib/selenium/webdriver/support/block_event_listener.rb
- lib/selenium/webdriver/support/abstract_event_listener.rb
- lib/selenium/webdriver/remote.rb

### Namespace

- MODULE Selenium::Client
- MODULE Selenium::Rake
- MODULE Selenium::WebDriver
- CLASS Selenium::Server

### Methods

- ::const_missing

### Class/Module Index

Quicksearch

- Selenium
- Selenium::Client
- Selenium::Client::Base
- Selenium::Client::CommandError
- Selenium::Client::Driver
- Selenium::Client::Extensions
- Selenium::Client::GeneratedDriver
- Selenium::Client::Idiomatic
- Selenium::Client::JavascriptExpressionBuilder
- Selenium::Client::JavascriptFrameworks
- Selenium::Client::JavascriptFrameworks::JQuery
- Selenium::Client::JavascriptFrameworks::Prototype
- Selenium::Client::Protocol
- Selenium::Client::ProtocolError
- Selenium::Client::SeleniumHelper
- Selenium::Rake
- Selenium::Rake::MissingJarFileError
- Selenium::Rake::ServerTask
- Selenium::Server
- Selenium::Server::Error
- Selenium::WebDriver
- Selenium::WebDriver::ActionBuilder
- Selenium::WebDriver::Alert
- Selenium::WebDriver::Android
- Selenium::WebDriver::Android::Bridge
- Selenium::WebDriver::BridgeHelper
- Selenium::WebDriver::Chrome
- Selenium::WebDriver::Chrome::Bridge
- Selenium::WebDriver::Chrome::Profile
- Selenium::WebDriver::Chrome::Service
- Selenium::WebDriver::Driver
- Selenium::WebDriver::DriverExtensions
- Selenium::WebDriver::DriverExtensions::HasBrowserConnection
- Selenium::WebDriver::DriverExtensions::HasInputDevices
- Selenium::WebDriver::DriverExtensions::HasLocation
- Selenium::WebDriver::DriverExtensions::HasSessionId
- Selenium::WebDriver::DriverExtensions::HasTouchScreen
- Selenium::WebDriver::DriverExtensions::HasWebStorage
- Selenium::WebDriver::DriverExtensions::Rotatable
- Selenium::WebDriver::DriverExtensions::TakesScreenshot
- Selenium::WebDriver::DriverExtensions::UploadsFiles
- Selenium::WebDriver::Element
- Selenium::WebDriver::Error
- Selenium::WebDriver::Error::ElementNotDisplayedError
- Selenium::WebDriver::Error::ElementNotSelectableError
- Selenium::WebDriver::Error::ElementNotVisibleError
- Selenium::WebDriver::Error::ExpectedError
- Selenium::WebDriver::Error::IMEEngineActivationFailedError
- Selenium::WebDriver::Error::IMENotAvailableError
- Selenium::WebDriver::Error::IndexOutOfBoundsError
- Selenium::WebDriver::Error::InvalidCookieDomainError
- Selenium::WebDriver::Error::InvalidElementCoordinatesError
- Selenium::WebDriver::Error::InvalidElementStateError
- Selenium::WebDriver::Error::InvalidSelectorError
- Selenium::WebDriver::Error::JavascriptError
- Selenium::WebDriver::Error::MoveTargetOutOfBoundsError
- Selenium::WebDriver::Error::NoAlertOpenError
- Selenium::WebDriver::Error::NoAlertPresentError
- Selenium::WebDriver::Error::NoCollectionError
- Selenium::WebDriver::Error::NoScriptResultError
- Selenium::WebDriver::Error::NoStringError
- Selenium::WebDriver::Error::NoStringLengthError
- Selenium::WebDriver::Error::NoStringWrapperError
- Selenium::WebDriver::Error::NoSuchCollectionError
- Selenium::WebDriver::Error::NoSuchDocumentError
- Selenium::WebDriver::Error::NoSuchDriverError
- Selenium::WebDriver::Error::NoSuchElementError
- Selenium::WebDriver::Error::NoSuchFrameError
- Selenium::WebDriver::Error::NoSuchWindowError
- Selenium::WebDriver::Error::NullPointerError
- Selenium::WebDriver::Error::ObsoleteElementError
- Selenium::WebDriver::Error::ScriptTimeOutError
- Selenium::WebDriver::Error::ServerError
- Selenium::WebDriver::Error::StaleElementReferenceError
- Selenium::WebDriver::Error::TimeOutError
- Selenium::WebDriver::Error::UnableToSetCookieError
- Selenium::WebDriver::Error::UnexpectedJavascriptError
- Selenium::WebDriver::Error::UnhandledAlertError
- Selenium::WebDriver::Error::UnhandledError
- Selenium::WebDriver::Error::UnknownCommandError
- Selenium::WebDriver::Error::UnknownError
- Selenium::WebDriver::Error::UnsupportedOperationError
- Selenium::WebDriver::Error::WebDriverError
- Selenium::WebDriver::Error::XPathLookupError
- Selenium::WebDriver::FileReaper
- Selenium::WebDriver::Firefox
- Selenium::WebDriver::Firefox::Binary
- Selenium::WebDriver::Firefox::Bridge
- Selenium::WebDriver::Firefox::Extension
- Selenium::WebDriver::Firefox::Launcher
- Selenium::WebDriver::Firefox::Profile
- Selenium::WebDriver::Firefox::ProfilesIni
- Selenium::WebDriver::Firefox::SocketLock
- Selenium::WebDriver::Firefox::Util
- Selenium::WebDriver::HTML5
- Selenium::WebDriver::HTML5::LocalStorage
- Selenium::WebDriver::HTML5::SessionStorage
- Selenium::WebDriver::HTML5::SharedWebStorage
- Selenium::WebDriver::IE
- Selenium::WebDriver::IE::Bridge
- Selenium::WebDriver::IE::Server
- Selenium::WebDriver::IPhone
- Selenium::WebDriver::IPhone::Bridge
- Selenium::WebDriver::JsonHelper
- Selenium::WebDriver::Keyboard
- Selenium::WebDriver::Keys
- Selenium::WebDriver::LogEntry
- Selenium::WebDriver::Mouse
- Selenium::WebDriver::Navigation
- Selenium::WebDriver::Opera
- Selenium::WebDriver::Opera::Bridge
- Selenium::WebDriver::Opera::Service
- Selenium::WebDriver::Options
- Selenium::WebDriver::PhantomJS
- Selenium::WebDriver::PhantomJS::Bridge
- Selenium::WebDriver::PhantomJS::Service
- Selenium::WebDriver::Platform
- Selenium::WebDriver::PortProber
- Selenium::WebDriver::ProfileHelper
- Selenium::WebDriver::ProfileHelper::ClassMethods
- Selenium::WebDriver::Proxy
- Selenium::WebDriver::Remote
- Selenium::WebDriver::Remote::Bridge
- Selenium::WebDriver::Remote::Capabilities
- Selenium::WebDriver::Remote::Http
- Selenium::WebDriver::Remote::Http::Common
- Selenium::WebDriver::Remote::Http::Curb
- Selenium::WebDriver::Remote::Http::Default
- Selenium::WebDriver::Remote::Http::Persistent
- Selenium::WebDriver::Remote::Response
- Selenium::WebDriver::Safari
- Selenium::WebDriver::Safari::Bridge
- Selenium::WebDriver::Safari::Browser
- Selenium::WebDriver::Safari::Extension
- Selenium::WebDriver::Safari::Server
- Selenium::WebDriver::SearchContext
- Selenium::WebDriver::SocketPoller
- Selenium::WebDriver::Support
- Selenium::WebDriver::Support::AbstractEventListener
- Selenium::WebDriver::Support::BlockEventListener
- Selenium::WebDriver::Support::Color
- Selenium::WebDriver::Support::EventFiringBridge
- Selenium::WebDriver::Support::Select
- Selenium::WebDriver::Support::Select::Escaper
- Selenium::WebDriver::TargetLocator
- Selenium::WebDriver::Timeouts
- Selenium::WebDriver::TouchActionBuilder
- Selenium::WebDriver::TouchScreen
- Selenium::WebDriver::Wait
- Selenium::WebDriver::Window
- Selenium::WebDriver::Zipper
- Base64
- Dir
- SocketError
- String

No matching classes.

# Selenium

Defines a mixin module that you can use to write Selenium tests without typing "@selenium." in front of every command. Every call to a missing method will be automatically sent to the @selenium object.

Defines an object that runs Selenium commands.

### Element Locators

Element Locators tell Selenium which HTML element a command refers to. The format of a locator is: locatorType=argument We support the following strategies for locating elements:

- identifier=id:

Select the element with the specified @id attribute. If no match is found, select the first element whose @name attribute is id. (This is normally the default; see below.)

- id=id:

Select the element with the specified @id attribute.

- name=name:

Select the first element with the specified @name attribute.

- username

- name=username

The name may optionally be followed by one or more element-filters, separated from the name by whitespace. If the filterType is not specified, value is assumed.

- name=flavour value=chocolate

- dom=javascriptExpression:

Find an element by evaluating the specified string. This allows you to traverse the HTML Document Object Model using JavaScript. Note that you must not return a value in this string; simply make it the last expression in the block.

- dom=document.forms.myDropdown

- dom=document.images

- dom=function foo() { return document.links; }; foo();

- xpath=xpathExpression:

Locate an element using an XPath expression.

- xpath=//img[@alt='The image alt text']

- xpath=//table[@id='table1']//tr/td

- xpath=//a

- xpath=//a/@class

- xpath=(//table)//th[text()='theHeaderText']/../td

- xpath=//input[@name='name2' and @value='yes']

- xpath=//*

- link=textPattern:

Select the link (anchor) element which contains text matching the specified pattern.

- link=The link text

- css=cssSelectorSyntax:

Select the element using css selectors. Please refer to CSS2 selectors, CSS3 selectors for more information. You can also check the TestCssLocators test in the selenium test suite for an example of usage, which is included in the downloaded selenium core package.

- css=a

- css=spanfirstChild + span

Currently the css selector locator supports all css1, css2 and css3 selectors except namespace in css3, some pseudo classes(:nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type, :only-of-type, :visited, :hover, :active, :focus, :indeterminate) and pseudo elements(::first-line, ::first-letter, ::selection, ::before, ::after).

- ui=uiSpecifierString:

Locate an element by resolving the UI specifier string to another locator, and evaluating it. See the Selenium UI-Element Reference for more details.

- ui=loginPages::loginButton()

- ui=settingsPages::toggle(label=Hide Email)

- ui=forumPages::postBody(index=2)//a

Without an explicit locator prefix, Selenium uses the following default strategies:

- dom, for locators starting with "document."

- xpath, for locators starting with "//"

- identifier, otherwise

### Element FiltersElement filters can be used with a locator to refine a list of candidate elements. They are currently used only in the 'name' element-locator.

Filters look much like locators, ie. filterType=argumentSupported element-filters are: value=valuePattern

Matches elements based on their values. This is particularly useful for refining a list of similarly-named toggle-buttons.index=index

Selects a single element based on its position in the list (offset from zero).===String-match Patterns Various Pattern syntaxes are available for matching string values:

- glob:pattern:

Match a string against a "glob" (aka "wildmat") pattern. "Glob" is a kind of limited regular-expression syntax typically used in command-line shells. In a glob pattern, "*" represents any sequence of characters, and "?" represents any single character. Glob patterns match against the entire string.

- regexp:regexp:

Match a string using a regular-expression. The full power of JavaScript regular-expressions is available.

- regexpi:regexpi:

Match a string using a case-insensitive regular-expression.

- exact:string:

Match a string exactly, verbatim, without any of that fancy wildcard stuff.

If no pattern prefix is specified, Selenium assumes that it's a "glob" pattern.

For commands that return multiple values (such as verifySelectOptions), the string being matched is a comma-separated list of the return values, where both commas and backslashes in the values are backslash-escaped. When providing a pattern, the optional matching syntax (i.e. glob, regexp, etc.) is specified once, as usual, at the beginning of the pattern.

### Constants

DEPRECATED_CONSTANTS

### Public Class Methods

const_missing(name) click to toggle source

    # File lib/selenium/client.rb, line 29
    def self.const_missing(name)
      if replacement = DEPRECATED_CONSTANTS[name.to_sym]
        warn "the Selenium::#{name} constant has been deprecated, please use #{replacement} instead"
        replacement
      else
        super
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.