Class: Rack::Padlock::Selenium

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/padlock/selenium.rb

Instance Method Summary collapse

Constructor Details

#initialize(addresses) ⇒ Selenium

Returns a new instance of Selenium.



5
6
7
# File 'lib/rack/padlock/selenium.rb', line 5

def initialize(addresses)
  @addresses = addresses
end

Instance Method Details

#startObject



9
10
11
12
13
14
15
# File 'lib/rack/padlock/selenium.rb', line 9

def start
  puts "Starting up selenium webdriver\n"
  @driver = ::Selenium::WebDriver.for :firefox
  @driver.manage.timeouts.implicit_wait = 30
  @addresses.each{|address| @driver.get(address)}
  @driver.quit
end