tellurium_driver 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/tellurium_driver.rb +9 -6
  2. metadata +1 -1
@@ -6,20 +6,23 @@ class TelluriumDriver
6
6
  browser, version,hub_ip = args
7
7
  @wait = Selenium::WebDriver::Wait.new(:timeout=>120)
8
8
 
9
+ is_local = version.include?("local") if version
9
10
  is_ie = browser.include?("internet") && version
10
- is_local_chrome = browser.include?("chrome") && version.include?("local")
11
- is_local_firefox = browser.include?("firefox")&& version.include?("local")
11
+ is_chrome = browser.include?("chrome")
12
+ is_firefox = browser.include?("firefox")
12
13
 
13
- if is_local_chrome
14
+ if is_chrome && is_local
14
15
  @driver = Selenium::WebDriver.for :chrome
15
- elsif is_local_firefox
16
+ elsif is_firefox && is_local
16
17
  @driver = Selenium::WebDriver.for :firefox
17
18
  elsif is_ie
18
19
  caps = Selenium::WebDriver::Remote::Capabilities.internet_explorer
19
20
  caps.version = version
20
21
  @driver = Selenium::WebDriver.for(:remote,:desired_capabilities=>caps,:url=> "http://#{hub_ip}:4444/wd/hub")
21
- else
22
- @driver = Selenium::WebDriver.for(:remote,:desired_capabilities=>browser,:url=> "http://#{hub_ip}:4444/wd/hub")
22
+ elsif is_chrome
23
+ @driver = Selenium::WebDriver.for(:remote,:desired_capabilities=>:chrome,:url=> "http://#{hub_ip}:4444/wd/hub")
24
+ elsif is_firefox
25
+ @driver = Selenium::WebDriver.for(:remote,:desired_capabilities=>:firefox,:url=> "http://#{hub_ip}:4444/wd/hub")
23
26
  end
24
27
 
25
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tellurium_driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: