spec/spec_helper.rb in watir-webdriver-0.4.1 vs spec/spec_helper.rb in watir-webdriver-0.5.0
- old
+ new
@@ -23,9 +23,14 @@
WEBDRIVER_SELECTORS = [:class, :class_name, :css, :id, :name, :tag_name, :xpath]
if ENV['TRAVIS']
ENV['DISPLAY'] = ":99.0"
+
+ if ENV['WATIR_WEBDRIVER_BROWSER'] == "chrome"
+ ENV['WATIR_WEBDRIVER_CHROME_BINARY'] = File.expand_path "chrome-linux/chrome"
+ ENV['WATIR_WEBDRIVER_CHROME_DRIVER'] = File.expand_path "chrome-linux/chromedriver"
+ end
end
if Selenium::WebDriver::Platform.linux? && ENV['DISPLAY'].nil?
raise "DISPLAY not set"
end