gridium 1.0.18 → 1.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/element.rb +11 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0b267c861928652d286605296c289c05834430a
4
- data.tar.gz: a778ba115b547531c36de17ef519468e94915dcf
3
+ metadata.gz: 9ffa161263791dc0459f8181368f180f6381d8ba
4
+ data.tar.gz: c9f91bbb2e3a531f4db07a083e86ac4bc0d59c9b
5
5
  SHA512:
6
- metadata.gz: 533b3a7724808ff449f8218f2764393e98e387df614ba91d135712947b81959a0c7f188ecd7da43935f09439820e0709fd160548adc932c7068238e632c1b6a9
7
- data.tar.gz: 766c008f362c7c8d2df085f343b536538041538fc46a4911fd7523dea742cb14043e2522dda7e86741a20e143d6d0a46597b9a6ee580d4fdfa88320eaf8c6856
6
+ metadata.gz: 9a1fd396f8e9325fa1702356aa7b15c2e1a310c30be8b293972a502ebb96574c1a5b5e707b2e15c7f62ba25fdf61d1891160011c8b72b838e30900b61652f341
7
+ data.tar.gz: cf15ddb6982fd07785b8513575d7d34e01b871795001391c8e1cb8588c50c3e4cc307f9f111931eb9ffc9d374682a67cad036cd417c7736acf4645f06b5c14ad
data/lib/element.rb CHANGED
@@ -53,7 +53,11 @@ class Element
53
53
  found_element = element; #this will always return the last displayed element
54
54
  end
55
55
  end
56
- rescue StandardError
56
+ if found_element.nil?
57
+ Log.debug "found #{elements.length} element(s) via #{@by} and #{@locator} and 0 are displayed"
58
+ end
59
+ rescue StandardError => error
60
+ Log.debug("element.displayed_element rescued: #{error}")
57
61
  if found_element
58
62
  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}")
59
63
  else
@@ -88,13 +92,15 @@ class Element
88
92
 
89
93
  def present?
90
94
  return element.enabled?
91
- rescue StandardError
95
+ rescue StandardError => error
96
+ Log.debug("element.present? is false because this error was rescued: #{error}")
92
97
  return false
93
98
  end
94
99
 
95
100
  def displayed?
96
101
  return element.displayed?
97
- rescue StandardError
102
+ rescue StandardError => error
103
+ Log.debug("element.displayed? is false because this error was rescued: #{error}")
98
104
  return false
99
105
  end
100
106
 
@@ -340,7 +346,8 @@ class Element
340
346
  def stale?
341
347
  return true if @element.nil?
342
348
  @element.disabled?
343
- rescue StandardError
349
+ rescue StandardError => error
350
+ Log.debug("element.stale? is true because this error was rescued: #{error}")
344
351
  Log.warn("Stale element detected.... #{self.to_s}")
345
352
  return true
346
353
  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: 1.0.18
4
+ version: 1.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Urban
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-27 00:00:00.000000000 Z
11
+ date: 2017-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler