<% if pageobject_driver.downcase == 'watir' -%> require 'watir-webdriver' <% end %> <% if pageobject_driver.downcase == 'selenium' -%> require 'selenium-webdriver' <% end %> Before do <% if pageobject_driver.downcase == 'watir' -%> @browser = Watir::Browser.new :chrome <% end %> <% if pageobject_driver.downcase == 'selenium' -%> @browser = Selenium::WebDriver.for :chrome <% end %> end After do @browser.close end