Class: Rack::Padlock::Selenium
- Inherits:
-
Object
- Object
- Rack::Padlock::Selenium
- Defined in:
- lib/rack/padlock/selenium.rb
Instance Method Summary collapse
-
#initialize(addresses) ⇒ Selenium
constructor
A new instance of Selenium.
- #start ⇒ Object
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
#start ⇒ Object
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 |