require "empiric/version" require "empiric/interface" require "watir-webdriver" module Empiric module_function attr_accessor :browser def included(caller) caller.__send__ :include, Empiric::Interface::Page end def initialize(browser = nil) @browser = Empiric.browser unless Empiric.browser.nil? @browser = browser if Empiric.browser.nil? Empiric.browser = browser if Empiric.browser.nil? end def set_browser(app = :chrome, *args) @browser = Watir::Browser.new(app, *args) Empiric.browser = @browser end def browser=(browser) @browser = browser end def browser @browser end end