gridium 1.1.42 → 1.1.43

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 +7 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f26680684a7be03d71d24283694c5fdf8e091d63
4
- data.tar.gz: 269bc03184b510b21ea7d09aa0c982e347029879
3
+ metadata.gz: 7a49d49ad1dd013a81d6662299c835cee9e31e27
4
+ data.tar.gz: de9f5db96026e7013c2494fd62d446b2343c6645
5
5
  SHA512:
6
- metadata.gz: 320b3b36f28fc2785d3279595e0445f9ca67d4943d63fc79ca9fdcc0c28856c3d957cec333634d38659fd616483a290fa9dcc7b85e0d9c91880193aebae9ad58
7
- data.tar.gz: 5a3f4adea5579fd9d6c9382292eb2dfa3a16f4c6c5a461e3ad60453fe470419c6e7d14e1216ec874aec5f2a7fbf09d22324f2f2d8b3b8440982ff122cce48e01
6
+ metadata.gz: 378692d04fba89ea77ed68895b47ceb42e9c7746e3a1ed4a30bf3a8a978aeec3f744699f4d29172498a997a0c0cbe1827ed743aabbca284e9340cf3e8f3c02ed
7
+ data.tar.gz: 1c4c33c9abf6a768eaf903e74c5b36a69bcdb9577fbfb9ad125db0556ee6c68a70fae6086a6fc1efe01bf35a27bc14774a1a97e8e3593d6ca33b6b2185071725
@@ -36,9 +36,9 @@ class Element
36
36
  if stale?
37
37
  wait = Selenium::WebDriver::Wait.new :timeout => timeout, :interval => 1
38
38
  if Gridium.config.visible_elements_only
39
- wait.until { @element = displayed_element }
39
+ human_readable_error { wait.until { @element = displayed_element } }
40
40
  else
41
- wait.until { @element = @parent.find_element(@by, @locator); Log.debug("[GRIDIUM::Element] Finding element #{self}..."); @element.enabled? }
41
+ human_readable_error { wait.until { @element = @parent.find_element(@by, @locator); Log.debug("[GRIDIUM::Element] Finding element #{self}..."); @element.enabled? } }
42
42
  end
43
43
 
44
44
  end
@@ -503,4 +503,9 @@ class Element
503
503
  true
504
504
  end
505
505
 
506
+ def human_readable_error(&block)
507
+ block.call
508
+ rescue StandardError => e
509
+ raise e.exception.class, "#{self} : #{e.message}"
510
+ end
506
511
  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.1.42
4
+ version: 1.1.43
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-10-19 00:00:00.000000000 Z
11
+ date: 2017-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  requirements: []
184
184
  rubyforge_project:
185
- rubygems_version: 2.6.13
185
+ rubygems_version: 2.6.14
186
186
  signing_key:
187
187
  specification_version: 4
188
188
  summary: This Gem is used to make building Selenium Tests without Capybara Easier.