Sha256: 28170b2585179deb824308ab71c36e1c00a3adefc472fb6e4c8881d5673f195e
Contents?: true
Size: 683 Bytes
Versions: 12
Compression:
Stored size: 683 Bytes
Contents
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../../', 'lib')) require 'rspec/expectations' require 'watir-webdriver' require 'selenium-webdriver' require 'page-object' Before do @browser = PageObject::PersistantBrowser.get_browser end at_exit do PageObject::PersistantBrowser.quit end module PageObject module PersistantBrowser @@browser = false def self.get_browser if !@@browser @@browser = Watir::Browser.new :firefox if ENV['DRIVER'] == 'WATIR' @@browser = Selenium::WebDriver.for :firefox if ENV['DRIVER'] == 'SELENIUM' end return @@browser end def self.quit @@browser.quit end end end
Version data entries
12 entries across 12 versions & 1 rubygems