Class: Hollandaise::Browser::Selenium

Inherits:
Base
  • Object
show all
Defined in:
lib/hollandaise/browser/selenium.rb

Instance Attribute Summary

Attributes inherited from Base

#browser

Instance Method Summary collapse

Methods inherited from Base

#close, #dir, #run_and_take_screenshot, #take_screenshot

Constructor Details

#initialize(browser, options) ⇒ Selenium

Returns a new instance of Selenium.



4
5
6
# File 'lib/hollandaise/browser/selenium.rb', line 4

def initialize(browser, options)
  @browser, @options = browser, options
end

Instance Method Details

#nameObject



14
15
16
# File 'lib/hollandaise/browser/selenium.rb', line 14

def name
  @browser
end

#seleniumObject



8
9
10
11
12
# File 'lib/hollandaise/browser/selenium.rb', line 8

def selenium
  require 'selenium/webdriver'

  @selenium ||= ::Selenium::WebDriver.for(@browser)
end

#targetObject



18
19
20
# File 'lib/hollandaise/browser/selenium.rb', line 18

def target
  dir.join("#{@browser}.png")
end