Sha256: f4128ae45001c2c88925d03a8faaed898a82f3e8e686d573b9ca1737bb2e97d7
Contents?: true
Size: 1.47 KB
Versions: 4
Compression:
Stored size: 1.47 KB
Contents
module TestNow #Firefox browser def launch_driver_firefox ENV['IS_UPA'] = "false" if ENV['IS_UPA'].nil? if ENV['IS_UPA']=="true" ENV['HAR_DIR'] = get_tmp_dir if ENV['HAR_DIR'].nil? profile = Selenium::WebDriver::Firefox::Profile.new profile.add_extension("./data/firebug-2.0.13.xpi") profile.add_extension("./data/netExport-0.8.xpi") profile['extensions.firebug.currentVersion'] = "2.0.13" profile['extensions.firebug.allPagesActivation'] = "on" profile['extensions.firebug.defaultPanelName'] = "net" profile['extensions.firebug.net.enableSites'] = "true" profile['extensions.firebug.netexport.alwaysEnableAutoExport'] = "true" profile['extensions.firebug.netexport.showPreview'] = "false" profile['extensions.firebug.netexport.defaultLogDir'] = ENV['HAR_DIR'].to_s profile['extensions.firebug.netexport.defaultFileName'] = "upaReport.har" profile['extensions.firebug.netexport.jsonpCallback'] = "jsonCallback" @driver = Selenium::WebDriver.for :firefox, :profile => profile else @driver = Selenium::WebDriver.for :firefox end @driver.manage.timeouts.implicit_wait = 30 @driver.manage.timeouts.page_load = 120 @driver.manage.window.maximize @driver end def get_tmp_dir case RUBY_PLATFORM when /mswin|msys|mingw|cygwin|bccwin|wince|emc/ return `echo %TEMP%` when /darwin|mac os/ return "/tmp/" else return "/tmp/" end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
testnow-0.0.6 | lib/testnow/firefox.rb |
testnow-0.0.5 | lib/testnow/firefox.rb |
testnow-0.0.4 | lib/testnow/firefox.rb |
testnow-0.0.3 | lib/testnow/firefox.rb |