testcentricity_web 4.4.4 → 4.4.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c0d20bb936dba985ea48c3530e3c6230b1325b9d4a6566ed0d65543e8a76f12
4
- data.tar.gz: 4301b1706050e1ede1de4c561eddd1fe27da5459890fe28b8a285cbb6d7e631d
3
+ metadata.gz: ffc632e024d749a91dc5f2c1f8975b0aa99f9783ffebe62216075fa3047568a5
4
+ data.tar.gz: 1d06294114d774a4d879ea534ad8bbe1ba5fce9fe327a1dc27c043dcdb3d53b8
5
5
  SHA512:
6
- metadata.gz: 209f0cee6d68f976a46f6978038450f6168c43ef4d10bf4797eb24a737f38c48265e8489c8cf13b449b028a3978801265b1ad3bf38c67a5acec082a54224e3ee
7
- data.tar.gz: 81a44b0962710c3c3a57f0fcbcca72b444e2e21bdb0067b7e944e181dc57036a86bc3de5d9b0358d1f2aa8c6bbd35a5cbf0094c5e2feb719ad49187b27977369
6
+ metadata.gz: 2d7e40b4dd16fc144dfa7f5ac09dd3ac6ed6f2c72e7cbf607d64f85d0e89a366b1f66d63add79e7db6f594c841a9897c34158a0adf620ad54e59d305a3442bb1
7
+ data.tar.gz: 8b762bff0363cf9dbc1a4d911c5e1bb2c8257b62f644c91afc4d274a1d1e47342f6ca94e48edc9113a235420070c3e00a42edf2910f2e4f58517820222ca295a
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [4.4.5] - 10-JAN-2024
6
+
7
+ ### Fixed
8
+ * `UIElement.find_object` no longer raises `Selenium::WebDriver::Error::StaleElementReferenceError` when testing with
9
+ multiple WebDriver instances.
10
+ * `DataPresenter.initialize` no longer fails if `data` parameter is `nil`.
11
+
12
+
5
13
  ## [4.4.4] - 08-JAN-2024
6
14
 
7
15
  ### Fixed
@@ -41,7 +41,7 @@ module TestCentricity
41
41
  attr_accessor :context
42
42
 
43
43
  def initialize(data)
44
- self.attributes = data
44
+ self.attributes = data unless data.nil?
45
45
  end
46
46
 
47
47
  def self.current
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '4.4.4'
2
+ VERSION = '4.4.5'
3
3
  end
@@ -46,7 +46,7 @@ module TestCentricity
46
46
  attr_reader :parent, :locator, :context, :type, :name
47
47
  attr_accessor :alt_locator, :locator_type, :original_style
48
48
  attr_accessor :base_object
49
- attr_accessor :mru_object, :mru_locator, :mru_parent
49
+ attr_accessor :mru_object, :mru_locator, :mru_parent, :mru_driver
50
50
 
51
51
  XPATH_SELECTORS = ['//', '[@', '[contains(']
52
52
  CSS_SELECTORS = %w[# :nth-child( :first-child :last-child :nth-of-type( :first-of-type :last-of-type ^= $= *= :contains(]
@@ -67,6 +67,7 @@ module TestCentricity
67
67
  @mru_object = nil
68
68
  @mru_locator = nil
69
69
  @mru_parent = nil
70
+ @mru_driver = nil
70
71
  end
71
72
 
72
73
  def set_locator_type(locator = nil)
@@ -1072,6 +1073,7 @@ module TestCentricity
1072
1073
  private
1073
1074
 
1074
1075
  def find_object(visible = true)
1076
+ reset_mru_cache if @mru_driver != Environ.driver_name
1075
1077
  obj_locator = @alt_locator.nil? ? @locator : @alt_locator
1076
1078
  parent_section = @context == :section && !@parent.get_locator.nil?
1077
1079
  tries ||= parent_section ? 2 : 1
@@ -1102,6 +1104,7 @@ module TestCentricity
1102
1104
  @mru_object = obj
1103
1105
  @mru_locator = obj_locator
1104
1106
  @mru_parent = parent_locator
1107
+ @mru_driver = Environ.driver_name
1105
1108
  [obj, @locator_type]
1106
1109
  rescue StandardError
1107
1110
  retry if (tries -= 1).positive?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.4
4
+ version: 4.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-08 00:00:00.000000000 Z
11
+ date: 2024-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler