Module Selenium::Client::Base
In: lib/selenium/client/base.rb

Driver constructor and session management commands

Methods

Included Modules

Selenium::Client::Protocol Selenium::Client::GeneratedDriver Selenium::Client::Extensions Selenium::Client::Idiomatic

Attributes

browser_string  [R] 
browser_url  [R] 
default_javascript_framework  [R] 
default_timeout_in_seconds  [R] 
highlight_located_element_by_default  [R] 
host  [R] 
port  [R] 

Public Class methods

Create a new client driver

Example:

Selenium::Client::Driver.new # :host => "localhost",

    :port => 4444,
    :browser => "*firefox",
    :timeout_in_seconds => 10,
    :url => "http://localhost:3000",

You can also set the default javascript framework used for :wait_for AJAX and effects semantics (:prototype is the default value):

Selenium::Client::Driver.new # :host => "localhost",

    :port => 4444,
    :browser => "*firefox",
    :timeout_in_seconds => 10,
    :url => "http://localhost:3000",
    :javascript_framework => :jquery

You can also enables automatic highlighting of located elements by passing the highlight_located_element option, e.g.

Selenium::Client::Driver.new # :host => "localhost",

    :port => 4444,
    :browser => "*firefox",
    :highlight_located_element => true

Public Instance methods

set_extension_js(new_javascript_extension)

Alias for javascript_extension=

Starts a new browser session (launching a new browser matching configuration provided at driver creation time).

Browser session specific option can also be provided. e.g.

   driver.start_new_browser_session(:captureNetworkTraffic => true)

[Validate]