testcentricity_web 4.4.3.1 → 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: 402ddb0f84e47ab7235c9c94964a17771028d35ab63f5fd808e2e2a5bbd921d3
4
- data.tar.gz: 4e57b15e56214e9a4f0007efa87292a87510c247212e99eb6e02d231810614bb
3
+ metadata.gz: ffc632e024d749a91dc5f2c1f8975b0aa99f9783ffebe62216075fa3047568a5
4
+ data.tar.gz: 1d06294114d774a4d879ea534ad8bbe1ba5fce9fe327a1dc27c043dcdb3d53b8
5
5
  SHA512:
6
- metadata.gz: 5ebdda9ab20659fcdaded775e2d8d710b4aecf8a337c7e6e1d72220384942d13b5694afcb32aae3a78bf3562ca3004a242772b6ad1f9d1eb3f41640f28a31067
7
- data.tar.gz: 477040485d47836f8994d37db199cf5f5e8163fe9119fdbb72804a32d3322d5513837079cdd27d5b0f764c758b38d286a86a4b8c0e3971e1f8532e4fc7f1f9be
6
+ metadata.gz: 2d7e40b4dd16fc144dfa7f5ac09dd3ac6ed6f2c72e7cbf607d64f85d0e89a366b1f66d63add79e7db6f594c841a9897c34158a0adf620ad54e59d305a3442bb1
7
+ data.tar.gz: 8b762bff0363cf9dbc1a4d911c5e1bb2c8257b62f644c91afc4d274a1d1e47342f6ca94e48edc9113a235420070c3e00a42edf2910f2e4f58517820222ca295a
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.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
+
13
+ ## [4.4.4] - 08-JAN-2024
14
+
15
+ ### Fixed
16
+ * `List.get_list_item` no longer returns `nil`.
17
+
18
+
5
19
  ## [4.4.3] - 24-DEC-2023
6
20
 
7
21
  ### Changed
@@ -18,12 +18,10 @@ module TestCentricity
18
18
  def start
19
19
  # terminate any currently running Appium Server
20
20
  if running?
21
- # :nocov:
22
21
  system('killall -9 node')
23
22
  puts 'Terminating existing Appium Server'
24
23
  sleep(5)
25
24
  puts 'Appium Server is being restarted'
26
- # :nocov:
27
25
  else
28
26
  puts 'Appium Server is starting'
29
27
  end
@@ -40,7 +38,7 @@ module TestCentricity
40
38
  # Check to see if Appium Server is running
41
39
  #
42
40
  def running?
43
- response = nil
41
+ response = false
44
42
  begin
45
43
  response = Net::HTTP.get_response(URI('http://0.0.0.0:4723/wd/hub/sessions'))
46
44
  rescue
@@ -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.3.1'
2
+ VERSION = '4.4.5'
3
3
  end
@@ -90,7 +90,7 @@ module TestCentricity
90
90
  item.delete!("\n")
91
91
  item.delete!("\r")
92
92
  item.delete!("\t")
93
- item.strip!
93
+ item
94
94
  end
95
95
 
96
96
  # Return the number of items in a list object.
@@ -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.3.1
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: 2023-12-31 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