gridium 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73b975ad9416cef474cf4fa5e93bd8555550c13d
4
- data.tar.gz: de3481093e293f456cb345c779d988b452bcf1d8
3
+ metadata.gz: e3d14191f23e8336ab424696936b964b43485a95
4
+ data.tar.gz: 859a4c45c037a0e32a3920ff9c720915fca9c766
5
5
  SHA512:
6
- metadata.gz: a0e3e4721c199250e6f8456f7864346ec8462039abc4d6d6018235c9e2a9a91360b4a063aa95cd33e595632b6e66a0e53b1388bc786c035a9aa920d6728fd01c
7
- data.tar.gz: 005cf0ffe01492be3e422aac5e10355de684e47ad6e91d50b1f17e1da2046d211c4c31edb3b9af053f9fd1ddd8e8b89f9cc1c3ae8283d579197663877ed5bfd9
6
+ metadata.gz: f553ef4803f2180ddee37f52c7d03da2e8863e0bb1007e38f8a6ef5a42b314c294d3dde450e84cb6d4d6c69b3d162a7ccff822cfe95d50b057e406692f8bdb2e
7
+ data.tar.gz: 4eb5a1135950c93af2d8df86b86c9cf597aa0f87d8d300ac313a159568b984ca6e861acb173bc304e298d3cd814433311933e9d4e1b6b673e9853beefa71db7b
data/lib/driver.rb CHANGED
@@ -30,6 +30,11 @@ class Driver
30
30
  ##Adding support for remote browsers
31
31
  if Gridium.config.browser_source == :remote
32
32
  @@driver = Selenium::WebDriver.for(:remote, url: Gridium.config.target_environment, desired_capabilities: Gridium.config.browser)
33
+ #this file detector is only used for remote drivers and is needed to upload files from test_host through Grid to browser
34
+ @@driver.file_detector = lambda do |args|
35
+ str = args.first.to_s
36
+ str if File.exist?(str)
37
+ end
33
38
  else
34
39
  @@driver = Selenium::WebDriver.for(Gridium.config.browser)
35
40
  end
data/lib/element.rb CHANGED
@@ -43,18 +43,20 @@ class Element
43
43
  #Found an issue where the element would go stale after it's found
44
44
  begin
45
45
  elements = @driver.find_elements(@by, @locator)
46
- ##there's a chance here the element is found but not displayed.
47
46
  elements.each do |element|
48
- if element.displayed? and element.enabled?
49
- found_element = element;
47
+ if element.displayed? #removed check for element.enabled
48
+ found_element = element; #this will always return the last displayed element
50
49
  end
51
50
  end
52
51
  rescue Exception => e
53
- Log.warn("A Crusty old element was detected.... #{self.to_s}")
54
- retry
52
+ if found_element
53
+ Log.warn("An element was found, but it was not displayed on the page. Gridium.config.visible_elements_only set to: #{Gridium.config.visible_elements_only} Element: #{self.to_s}")
54
+ else
55
+ Log.warn("Could not find Element: #{self.to_s}")
56
+ end
55
57
  end
56
58
 
57
- return found_element
59
+ found_element
58
60
  end
59
61
 
60
62
  # ================ #
@@ -96,7 +98,7 @@ class Element
96
98
  end
97
99
 
98
100
  def enabled?
99
- return element.enabled?
101
+ element.enabled?
100
102
  end
101
103
 
102
104
  def clear
@@ -1,3 +1,3 @@
1
1
  module Gridium
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Urban
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-08 00:00:00.000000000 Z
11
+ date: 2016-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler