ae_page_objects 4.0.0.pre2 → 4.0.0.pre3

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: 50d35e8c1e68af70f41734da9dbf0d3442750c13
4
- data.tar.gz: 30545da8e16c4dd7f4ab7897e0f2f60236bf7b59
3
+ metadata.gz: c74b68a1c39113aa789cd3630e1c3502992945a2
4
+ data.tar.gz: 779ef880d3bb5d81745b8683173f57ab40564c32
5
5
  SHA512:
6
- metadata.gz: 7fe8d65c10fa6f26834f51957a1095c6878029cd540295071f795677ace5689d5421a259f8b8718f3547fcbbd0d02961d68e41d6e6841ea77644e9583ae2e8ac
7
- data.tar.gz: 1f9e1bc8c59a923fbc32ae63f0de4e04d8f55ed2b5727869b7aad8e9d72d3ffef00ba09690406d9efd4dd5c25d0f2c1c4fef894bec4dd83d2e451874b3479969
6
+ metadata.gz: f661d71759e365cbbef81c5f0cb03448d17a237ca11586d3b45e4103d6cb4b276c42f4046097e792505dd52945327f81d15ee01b47ab8e58f12f1e78edaff8dd
7
+ data.tar.gz: cb1ba032cde6992819945287408a55d249bf1fa9a8a11c19f8aff4d9f5c42070971b7a461701522cc804786e0bf04d18055709a56dcc6ff896804f35a866f121
@@ -73,6 +73,13 @@ module AePageObjects
73
73
  @locator == default_locator
74
74
  end
75
75
 
76
+ def reload_descendents
77
+ parent.reload_descendents if parent.respond_to?(:reload_descendents)
78
+ @node = scoped_node
79
+ @stale = false
80
+ ensure_loaded!
81
+ end
82
+
76
83
  private
77
84
 
78
85
  def configure(options)
@@ -99,6 +99,11 @@ module AePageObjects
99
99
  end
100
100
 
101
101
  implicit_element.__send__(name, *args, &block)
102
+ rescue Selenium::WebDriver::Error::StaleElementReferenceError
103
+ # A StaleElementReferenceError can occur when a selenium node is referenced but is no longer attached to the DOM.
104
+ # In this case we need to work our way up the element tree to make sure we are referencing the latest DOM nodes.
105
+ implicit_element.reload_descendents
106
+ retry
102
107
  end
103
108
 
104
109
  def respond_to?(*args)
@@ -1,3 +1,3 @@
1
1
  module AePageObjects
2
- VERSION = '4.0.0.pre2'.freeze
2
+ VERSION = '4.0.0.pre3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ae_page_objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.pre2
4
+ version: 4.0.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donnie Tognazzini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-24 00:00:00.000000000 Z
11
+ date: 2018-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: 1.3.1
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.5.2
83
+ rubygems_version: 2.4.8
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Capybara Page Objects pattern