testcentricity_web 4.4.4 → 4.4.6

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: e92b6f91b2bfdf3ae7525d6db07dac2b8c7b914172d7d1289358d11ea185e5ce
4
+ data.tar.gz: b688eade0062d23df723f7d22a3e0876769a76de30303cb6fd2152c36147c819
5
5
  SHA512:
6
- metadata.gz: 209f0cee6d68f976a46f6978038450f6168c43ef4d10bf4797eb24a737f38c48265e8489c8cf13b449b028a3978801265b1ad3bf38c67a5acec082a54224e3ee
7
- data.tar.gz: 81a44b0962710c3c3a57f0fcbcca72b444e2e21bdb0067b7e944e181dc57036a86bc3de5d9b0358d1f2aa8c6bbd35a5cbf0094c5e2feb719ad49187b27977369
6
+ metadata.gz: 8dca2c3f15e28d76644505ba18d9859a9ab8f2be5f5eb70eba7c94f76fb2202b3093d7364d6352d37e0161a11ce5742562f70620f40822dc0459a1006a249abe
7
+ data.tar.gz: b2c3afd7930d8748b02a3df59b35268e34e9ae46c85453c6147cbb175b7f1ba44edc410750d9bb41bf3753040c32f075215137fc3f1fba26b44f3b55ec8ec910
data/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [4.4.6] - 12-JAN-2024
6
+
7
+ ### Fixed
8
+ * `WebDriverConnect.num_drivers` no longer raises exception if called before any WebDrivers have been instantiated.
9
+
10
+
11
+ ## [4.4.5] - 10-JAN-2024
12
+
13
+ ### Fixed
14
+ * `UIElement.find_object` no longer raises `Selenium::WebDriver::Error::StaleElementReferenceError` when testing with
15
+ multiple WebDriver instances.
16
+ * `DataPresenter.initialize` no longer fails if `data` parameter is `nil`.
17
+
18
+
5
19
  ## [4.4.4] - 08-JAN-2024
6
20
 
7
21
  ### 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.6'
3
3
  end
@@ -122,7 +122,7 @@ module TestCentricity
122
122
  #
123
123
  # @return [Integer]
124
124
  def self.num_drivers
125
- @drivers.length
125
+ @drivers.nil? ? 0 : @drivers.length
126
126
  end
127
127
 
128
128
  # Close all browsers and terminate all driver instances
@@ -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.6
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-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler