lib/power_school/configuration.rb in power_school-0.0.3 vs lib/power_school/configuration.rb in power_school-0.0.4
- old
+ new
@@ -18,24 +18,16 @@
def reset
self.host = HOST
self.username = USERNAME
self.password = PASSWORD
end
-
+
def configure
yield self
- download_directory = "#{Dir.pwd}/downloads"
-
- profile = Selenium::WebDriver::Firefox::Profile.new
- profile["browser.download.useDownloadDir"] = true
- profile['browser.download.dir'] = download_directory
- profile['browser.helperApps.neverAsk.saveToDisk'] = "Document, text/plain"
- profile['browser.helperApps.neverAsk.openFile'] = "Document, text/plain"
- # puts profile.inspect
- #driver = Selenium::WebDriver.for :firefox, :profile => profile
- #self.browser ||= Watir::Browser.new(driver)
-
- self.browser ||= Watir::Browser.new :firefox, :profile => profile
+ client = Selenium::WebDriver::Remote::Http::Default.new
+ client.timeout = 180 # seconds – default is 60
+
+ self.browser ||= Watir::Browser.new :chrome, :http_client => client
end
end
end