Module: CapybaraSelenium

Extended by:
AppServer, SeleniumServer
Defined in:
lib/capybara_selenium.rb,
lib/capybara_selenium/version.rb,
lib/capybara_selenium/server/configurator.rb,
lib/capybara_selenium/app_server/configurator.rb,
lib/capybara_selenium/app_server/configuration.rb,
lib/capybara_selenium/selenium_server/configurator.rb,
lib/capybara_selenium/selenium_server/configuration.rb

Overview

Helpers for initializing selenium drivers

Defined Under Namespace

Modules: AppServer, SeleniumServer, Server

Constant Summary collapse

VERSION =
'0.0.6'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.app_serverObject (readonly)

Returns the value of attribute app_server


17
18
19
# File 'lib/capybara_selenium.rb', line 17

def app_server
  @app_server
end

.driverObject (readonly)

Returns the value of attribute driver


17
18
19
# File 'lib/capybara_selenium.rb', line 17

def driver
  @driver
end

.selenium_serverObject (readonly)

Returns the value of attribute selenium_server


17
18
19
# File 'lib/capybara_selenium.rb', line 17

def selenium_server
  @selenium_server
end

Class Method Details

.configure(app_server_type = :rack, selenium_server_type = :remote) {|_self| ... } ⇒ Object

Parameters:

  • app_server_type (Symbol) (defaults to: :rack)

    The application server type. Default: :rack

  • selenium_server_type (Symbol The selenium server type. Default: :remote) (defaults to: :remote)

    elenium_server_type [Symbol The selenium server type. Default: :remote

Yields:

  • (_self)

Yield Parameters:


23
24
25
26
27
28
29
# File 'lib/capybara_selenium.rb', line 23

def configure(app_server_type = :rack, selenium_server_type = :remote)
  @app_server = configurator :app_server, app_server_type
  @selenium_server = configurator :selenium_server, selenium_server_type
  yield self
  app_server.apply
  selenium_server.apply
end