testcentricity_web 4.6.9 → 4.6.11

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: 48391198c0afc8b42f948c2e3dd6dbf77b0b8ff486fa4e9746bbaf2ec34c0231
4
- data.tar.gz: e377c0af90d0b0478ea4dcad9ef08b1df337facc87dabc0215cbbed6c2a51a31
3
+ metadata.gz: 2185f428931eb2ff4cf1c50195cba1c7c504497b928e040ab310783eca6c3dc5
4
+ data.tar.gz: e26b18cf4ab4472479ee832643e07ce2ecf38daaa49646ae3cbac1a582c3819d
5
5
  SHA512:
6
- metadata.gz: 762285729fbfcfc5f56b56a060f5a32d0e23f9f865417733621be3241dc9da01ca6b562991aa0d871989702d6a1b54952f3f2a7c7d640e9f68c726e5dd1ad0f4
7
- data.tar.gz: fc982517f54bf55c571f5b0062abd1237e6df518badda8711a9ac2812faebfaba58d59703d739c91b25a9bf9e4187399160dc15449fa637f6a5e4d263a9651e8
6
+ metadata.gz: 51888898939d4dad21cffdaec1ffca20b563bea45281d7d133dfd81266eb198d0b33e8fe7a4dc54b7b0d02c73d4958fa88e4f5ed57cdec73fa0723574db5dc28
7
+ data.tar.gz: a8671251ac33cf625e0cf997af13b8a8ee92989604321812943dfe9ce676ee32765cd49c675477e66ab8b7b2dbe6db39a66cb44914ab93dc14fa2aca83f234eb
data/CHANGELOG.md CHANGED
@@ -2,6 +2,40 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [4.6.11] - 24-NOV-2025
6
+
7
+ ### Removed
8
+
9
+ * Appium version 1.x is no longer supported.
10
+
11
+
12
+ ## [4.6.10] - 07-NOV-2025
13
+
14
+ ### Added
15
+
16
+ * Added the following `Media` methods to support verification of media text tracks (subtitles, captions,
17
+ chapters, descriptions, or metadata):
18
+ * `active_track_cue_count`
19
+ * `track_cue_count`
20
+ * `active_cue_text`
21
+ * `cue_text`
22
+ * `active_cue_data`
23
+ * `all_cues_text`
24
+ * `all_cues_data`
25
+ * Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of the following
26
+ `Media` properties:
27
+ * `:active_track_cue_count`
28
+ * `active_cue_text`
29
+ * `all_tracks_data`
30
+ * `active_cue_data`
31
+ * `all_cues_text`
32
+ * `all_cues_data`
33
+
34
+ ### Changed
35
+
36
+ * `Media.current_time` and `Media.duration` now return `Float` rounded to nearest tenth.
37
+
38
+
5
39
  ## [4.6.9] - 31-OCT-2025
6
40
 
7
41
  ### Added
data/README.md CHANGED
@@ -796,30 +796,36 @@ The `verify_ui_states` method supports the following property/state pairs:
796
796
 
797
797
  **Audio/Video Media Objects**
798
798
 
799
- :autoplay Boolean
800
- :ended Boolean
801
- :controls Boolean
802
- :loop Boolean
803
- :muted Boolean
804
- :default_muted Boolean
805
- :paused Boolean
806
- :seeking Boolean
807
- :src String
808
- :current_time Float
809
- :default_playback_rate Float
810
- :duration Float
811
- :playback_rate Float
812
- :ready_state Integer
813
- :volume Float
814
- :preload String
815
- :poster String
816
- :track_count Integer
817
- :active_track Integer
818
- :active_track_data Hash
819
- :all_tracks_data Array of Hash
820
- :track_data Hash
821
- :active_track_source String
822
- :track_source String
799
+ :autoplay Boolean
800
+ :ended Boolean
801
+ :controls Boolean
802
+ :loop Boolean
803
+ :muted Boolean
804
+ :default_muted Boolean
805
+ :paused Boolean
806
+ :seeking Boolean
807
+ :src String
808
+ :current_time Float
809
+ :default_playback_rate Float
810
+ :duration Float
811
+ :playback_rate Float
812
+ :ready_state Integer
813
+ :volume Float
814
+ :preload String
815
+ :poster String
816
+ :track_count Integer
817
+ :active_track Integer
818
+ :active_track_data Hash
819
+ :all_tracks_data Array of Hash
820
+ :track_data Hash
821
+ :active_track_source String
822
+ :track_source String
823
+ :active_track_cue_count Integer
824
+ :active_cue_text String
825
+ :all_tracks_data Array of Hash
826
+ :active_cue_data Array of Hash
827
+ :all_cues_text Array of Hash
828
+ :all_cues_data Array of Hash
823
829
 
824
830
  #### ARIA Accessibility Property/State Pairs
825
831
 
@@ -1463,7 +1469,7 @@ If the optional `options` hash is not provided when calling the `TestCentricity:
1463
1469
  then **Environment Variables** must be used to specify the target local or remote web browser, and the various webdriver
1464
1470
  capability parameters required to establish a connection with a single target web browser.
1465
1471
 
1466
- ### Specifying Options and Capabilities in the `options` Hash
1472
+ ### Specifying Options and Capabilities using the `options` Hash
1467
1473
 
1468
1474
  For those test scenarios requiring the instantiation of multiple WebDriver objects, or where cumbersome **Environment
1469
1475
  Variables** are less than ideal, call the `TestCentricity::WebDriverConnect.initialize_web_driver` method with an `options`
@@ -1523,7 +1529,7 @@ expects a driver name, specified as a `Symbol`.
1523
1529
 
1524
1530
  ### Setting Desktop Browser Window Size
1525
1531
 
1526
- #### Using `:browser_size` in the `options` Hash
1532
+ #### Using `:browser_size` using the `options` Hash
1527
1533
 
1528
1534
  The size (width and height) of a desktop browser window can be specified in the `options` hash for browsers that are hosted
1529
1535
  locally, in a Selenium Grid, or by a cloud hosted browser service provider. You cannot set the size of a mobile device web
@@ -1597,7 +1603,7 @@ the following Environment Variables must be set as described in the table below:
1597
1603
  Refer to [**section 8.9 (Using Browser Specific Profiles in `cucumber.yml`)**](#using-browser-specific-profiles-in-cucumber-yml) below.
1598
1604
 
1599
1605
 
1600
- #### Local Desktop Browser in the `options` Hash
1606
+ #### Local Desktop Browser using the `options` Hash
1601
1607
 
1602
1608
  When using the `options` hash, the following options and capabilities must be specified:
1603
1609
  - `driver:` must be set to `:webdriver`
@@ -1745,7 +1751,7 @@ then the following Environment Variables must be set as described in the table b
1745
1751
  Refer to [**section 8.9 (Using Browser Specific Profiles in `cucumber.yml`)**](#using-browser-specific-profiles-in-cucumber-yml) below.
1746
1752
 
1747
1753
 
1748
- #### Local Emulated Mobile Browser in the `options` Hash
1754
+ #### Local Emulated Mobile Browser using the `options` Hash
1749
1755
 
1750
1756
  When using the `options` hash, the following options and capabilities must be specified:
1751
1757
  - `driver:` must be set to `:webdriver`
@@ -1853,7 +1859,7 @@ then the following Environment Variables must be set as described in the table b
1853
1859
  Refer to [**section 8.9 (Using Browser Specific Profiles in `cucumber.yml`)**](#using-browser-specific-profiles-in-cucumber-yml) below.
1854
1860
 
1855
1861
 
1856
- #### Grid Browser in the `options` Hash
1862
+ #### Grid Browser using the `options` Hash
1857
1863
 
1858
1864
  When using the `options` hash, the following options and capabilities must be specified:
1859
1865
  - `driver:` must be set to `:grid`
@@ -1889,10 +1895,6 @@ Below is an example of an `options` hash for specifying a connection to a grid h
1889
1895
 
1890
1896
  Refer to [this page](https://appium.io/docs/en/2.2/guides/caps/) for information regarding specifying Appium capabilities.
1891
1897
 
1892
- ⚠️ If you are running locally hosted mobile web tests on iOS or Android simulators or devices using version 1.x of the Appium
1893
- server, the `APPIUM_SERVER_VERSION` environment variable must be set to `1` in order to ensure that the correct Appium server
1894
- endpoint is used.
1895
-
1896
1898
  #### Mobile Safari Browser on iOS Simulators or iOS Physical Devices
1897
1899
 
1898
1900
  You can run your mobile web tests against the mobile Safari browser on iOS device simulators or physically connected iOS
@@ -1939,7 +1941,7 @@ from the Appium Server GUI app. A security violation error will occur without re
1939
1941
  Refer to [**section 8.9 (Using Browser Specific Profiles in `cucumber.yml`)**](#using-browser-specific-profiles-in-cucumber-yml) below.
1940
1942
 
1941
1943
 
1942
- ##### Local Mobile Safari Browser in the `options` Hash
1944
+ ##### Local Mobile Safari Browser using the `options` Hash
1943
1945
 
1944
1946
  When using the `options` hash, the following options and capabilities must be specified:
1945
1947
  - `driver:` must be set to `:appium`
@@ -2025,7 +2027,7 @@ the following **Environment Variables** must be set as described in the table be
2025
2027
  Refer to [**section 8.9 (Using Browser Specific Profiles in `cucumber.yml`)**](#using-browser-specific-profiles-in-cucumber-yml) below.
2026
2028
 
2027
2029
 
2028
- ##### Local Mobile Android Browser in the `options` Hash
2030
+ ##### Local Mobile Android Browser using the `options` Hash
2029
2031
 
2030
2032
  When using the `options` hash, the following options and capabilities must be specified:
2031
2033
  - `driver:` must be set to `:appium`
@@ -2109,15 +2111,6 @@ starting your Cucumber test suite(s):
2109
2111
 
2110
2112
  run_appium: APPIUM_SERVER=run
2111
2113
 
2112
- If you are running locally hosted mobile web tests on iOS or Android simulators or devices using version 1.x of the Appium
2113
- server, the `APPIUM_SERVER_VERSION` environment variable must be set to `1` in order to ensure that the correct Appium server
2114
- endpoint is used. This can be set by adding the following to your `cucumber.yml` file and including `-p appium_1x` in your
2115
- command line when starting your Cucumber test suite(s):
2116
-
2117
- appium_1x: APPIUM_SERVER_VERSION=1
2118
-
2119
- Refer to [**section 8.9 (Using Browser Specific Profiles in `cucumber.yml`)**](#using-browser-specific-profiles-in-cucumber-yml) below.
2120
-
2121
2114
 
2122
2115
  ##### Using Appium Server with RSpec
2123
2116
 
@@ -2136,9 +2129,6 @@ body of an example group:
2136
2129
  $server.stop if Environ.driver == :appium && $server.running?
2137
2130
  end
2138
2131
  ```
2139
- If you are running locally hosted mobile web tests on iOS or Android simulators or devices using version 1.x of the Appium
2140
- server, the `APPIUM_SERVER_VERSION` environment variable must be set to `1` in order to ensure that the correct Appium server
2141
- endpoint is used.
2142
2132
 
2143
2133
 
2144
2134
  ### Remote Cloud Hosted Desktop and Mobile Web Browsers
@@ -2187,7 +2177,7 @@ the following **Environment Variables** must be set as described in the table be
2187
2177
  | `NETWORK_LOGS` | [Optional] Capture network logs (`true` or `false`) |
2188
2178
 
2189
2179
 
2190
- ##### BrowserStack Desktop Browser in the `options` Hash
2180
+ ##### BrowserStack Desktop Browser using the `options` Hash
2191
2181
 
2192
2182
  When using the `options` hash, the following options and capabilities must be specified:
2193
2183
  - `driver:` must be set to `:browserstack`
@@ -2284,7 +2274,7 @@ the following **Environment Variables** must be set as described in the table be
2284
2274
  | `APPIUM_LOGS` | [Optional] Generate Appium logs (`true` or `false`) |
2285
2275
 
2286
2276
 
2287
- ##### BrowserStack Mobile Browser in the `options` Hash
2277
+ ##### BrowserStack Mobile Browser using the `options` Hash
2288
2278
 
2289
2279
  When using the `options` hash, the following options and capabilities must be specified:
2290
2280
  - `driver:` must be set to `:browserstack`
@@ -2374,7 +2364,7 @@ the following **Environment Variables** must be set as described in the table be
2374
2364
  | `RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`) |
2375
2365
 
2376
2366
 
2377
- ##### Sauce Labs Desktop Browser in the `options` Hash
2367
+ ##### Sauce Labs Desktop Browser using the `options` Hash
2378
2368
 
2379
2369
  When using the `options` hash, the following options and capabilities must be specified:
2380
2370
  - `driver:` must be set to `:saucelabs`
@@ -2460,7 +2450,7 @@ the following **Environment Variables** must be set as described in the table be
2460
2450
  | `ORIENTATION` | [Optional] Set to `PORTRAIT` or `LANDSCAPE` |
2461
2451
 
2462
2452
 
2463
- ##### Sauce Labs Mobile Browser in the `options` Hash
2453
+ ##### Sauce Labs Mobile Browser using the `options` Hash
2464
2454
 
2465
2455
  When using the `options` hash, the following options and capabilities must be specified:
2466
2456
  - `driver:` must be set to `:saucelabs`
@@ -2551,7 +2541,7 @@ the following **Environment Variables** must be set as described in the table be
2551
2541
  | `BROWSER_SIZE` | [Optional] Specify width, height of browser window |
2552
2542
 
2553
2543
 
2554
- ##### TestingBot Desktop Browser in the `options` Hash
2544
+ ##### TestingBot Desktop Browser using the `options` Hash
2555
2545
 
2556
2546
  When using the `options` hash, the following options and capabilities must be specified:
2557
2547
  - `driver:` must be set to `:testingbot`
@@ -2631,7 +2621,7 @@ the following **Environment Variables** must be set as described in the table be
2631
2621
  | `ORIENTATION` | [Optional] Set to `portrait` or `landscape` |
2632
2622
 
2633
2623
 
2634
- ##### TestingBot Mobile Browser in the `options` Hash
2624
+ ##### TestingBot Mobile Browser using the `options` Hash
2635
2625
 
2636
2626
  When using the `options` hash, the following options and capabilities must be specified:
2637
2627
  - `driver:` must be set to `:testingbot`
@@ -2714,7 +2704,7 @@ the following **Environment Variables** must be set as described in the table be
2714
2704
  | `CONSOLE_LOGS` | [Optional] Used to capture browser console logs. |
2715
2705
 
2716
2706
 
2717
- ##### LambdaTest Desktop Browser in the `options` Hash
2707
+ ##### LambdaTest Desktop Browser using the `options` Hash
2718
2708
 
2719
2709
  When using the `options` hash, the following options and capabilities must be specified:
2720
2710
  - `driver:` must be set to `:lambdatest`
@@ -2960,7 +2950,6 @@ with access to your version control system.
2960
2950
  #==============
2961
2951
 
2962
2952
  run_appium: APPIUM_SERVER=run
2963
- appium_1x: APPIUM_SERVER_VERSION=1
2964
2953
 
2965
2954
 
2966
2955
  #==============
@@ -38,11 +38,7 @@ module TestCentricity
38
38
  # Check to see if Appium Server is running
39
39
  #
40
40
  def running?
41
- endpoint = if ENV['APPIUM_SERVER_VERSION'] && ENV['APPIUM_SERVER_VERSION'].to_i == 1
42
- 'http://0.0.0.0:4723/wd/hub/sessions'
43
- else
44
- 'http://0.0.0.0:4723/sessions'
45
- end
41
+ endpoint = 'http://0.0.0.0:4723/sessions'
46
42
  response = false
47
43
  begin
48
44
  response = Net::HTTP.get_response(URI(endpoint))
@@ -65,7 +65,6 @@ module TestCentricity
65
65
  @session_id = Time.now.strftime('%d%H%M%S%L')
66
66
  @session_time_stamp = Time.now.strftime('%Y%m%d%H%M%S')
67
67
  @test_environment = ENV['TEST_ENVIRONMENT']
68
- @a11y_standard = ENV['ACCESSIBILITY_STANDARD'] || 'best-practice'
69
68
  @locale = ENV['LOCALE'] || 'en'
70
69
  @language = ENV['LANGUAGE'] || 'English'
71
70
  @screen_shots = []
@@ -147,6 +146,7 @@ module TestCentricity
147
146
  @deep_link_prefix = data['DEEP_LINK_PREFIX']
148
147
  @ios_bundle_id = data['IOS_BUNDLE_ID']
149
148
  @android_app_id = data['ANDROID_APP_ID']
149
+ @a11y_standard = ENV['ACCESSIBILITY_STANDARD'] || 'best-practice'
150
150
 
151
151
  url = @hostname.blank? ? "#{@base_url}#{@append}" : "#{@hostname}/#{@base_url}#{@append}"
152
152
  @app_host = if @user_id.blank? || @password.blank?
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '4.6.9'
2
+ VERSION = '4.6.11'
3
3
  end
@@ -149,8 +149,18 @@ module TestCentricity
149
149
  ui_object.active_track_data
150
150
  when :active_track_source
151
151
  ui_object.active_track_source
152
+ when :active_track_cue_count
153
+ ui_object.active_track_cue_count
154
+ when :active_cue_text
155
+ ui_object.active_cue_text
152
156
  when :all_tracks_data
153
157
  ui_object.all_tracks_data
158
+ when :active_cue_data
159
+ ui_object.active_cue_data
160
+ when :all_cues_text
161
+ ui_object.all_cues_text
162
+ when :all_cues_data
163
+ ui_object.all_cues_data
154
164
  when :preload
155
165
  ui_object.preload
156
166
  when :poster
@@ -198,12 +198,6 @@ module TestCentricity
198
198
  Environ.session_state = :running
199
199
  end
200
200
 
201
- # :nocov:
202
-
203
- def self.set_domain(url)
204
- Capybara.app_host = url
205
- end
206
-
207
201
  def self.close_tunnel
208
202
  unless @bs_local.nil?
209
203
  @bs_local.stop
@@ -214,6 +208,11 @@ module TestCentricity
214
208
  end
215
209
  end
216
210
  end
211
+
212
+ # :nocov:
213
+ def self.set_domain(url)
214
+ Capybara.app_host = url
215
+ end
217
216
  # :nocov:
218
217
 
219
218
  private
@@ -311,13 +310,7 @@ module TestCentricity
311
310
  @capabilities
312
311
  end
313
312
  # specify endpoint url
314
- if @endpoint.nil?
315
- @endpoint = if ENV['APPIUM_SERVER_VERSION'] && ENV['APPIUM_SERVER_VERSION'].to_i == 1
316
- 'http://127.0.0.1:4723/wd/hub'
317
- else
318
- 'http://127.0.0.1:4723'
319
- end
320
- end
313
+ @endpoint = 'http://127.0.0.1:4723' if @endpoint.nil?
321
314
  register_remote_driver(Environ.browser, caps)
322
315
  end
323
316
 
@@ -432,7 +425,6 @@ module TestCentricity
432
425
  end
433
426
  # specify endpoint url
434
427
  @endpoint = "https://#{ENV['BS_USERNAME']}:#{ENV['BS_AUTHKEY']}@hub-cloud.browserstack.com/wd/hub" if @endpoint.nil?
435
- # :nocov:
436
428
  # enable tunneling if specified
437
429
  if ENV['TUNNELING']
438
430
  @bs_local = BrowserStack::Local.new
@@ -444,7 +436,6 @@ module TestCentricity
444
436
  puts 'BrowserStack Local instance failed to start'
445
437
  end
446
438
  end
447
- # :nocov:
448
439
  # define BrowserStack options
449
440
  options = if @capabilities.nil?
450
441
  Environ.os = "#{ENV['BS_OS']} #{ENV['BS_OS_VERSION']}"
@@ -126,7 +126,7 @@ module TestCentricity
126
126
  def current_time
127
127
  obj, = find_element(visible = :all)
128
128
  object_not_found_exception(obj, @type)
129
- obj.native.attribute('currentTime').to_f.round(2)
129
+ obj.native.attribute('currentTime').to_f.round(1)
130
130
  end
131
131
 
132
132
  # Return media defaultPlaybackRate property
@@ -150,7 +150,7 @@ module TestCentricity
150
150
  def duration
151
151
  obj, = find_element(visible = :all)
152
152
  object_not_found_exception(obj, @type)
153
- obj.native.attribute('duration').to_f.round(2)
153
+ obj.native.attribute('duration').to_f.round(1)
154
154
  end
155
155
 
156
156
  # Return media playbackRate property
@@ -195,7 +195,7 @@ module TestCentricity
195
195
  wait = Selenium::WebDriver::Wait.new(timeout: timeout)
196
196
  wait.until do
197
197
  reset_mru_cache
198
- ready_state == value
198
+ compare(value, ready_state)
199
199
  end
200
200
  rescue StandardError
201
201
  if post_exception
@@ -325,6 +325,124 @@ module TestCentricity
325
325
  track_obj[:src]
326
326
  end
327
327
 
328
+ # Return number of text cues of active text track of associated media
329
+ #
330
+ # @return [Integer] number of text cues
331
+ # @example
332
+ # num_cues = media_player.active_track_cue_count
333
+ #
334
+ def active_track_cue_count
335
+ active = active_track
336
+ return nil if active.zero?
337
+
338
+ track_cue_count(active)
339
+ end
340
+
341
+ # Return number of text cues of specified text track of associated media
342
+ #
343
+ # @param track [Integer] index of requested track
344
+ # @return [Integer] number of text cues
345
+ # @example
346
+ # num_cues = media_player.track_cue_count(2)
347
+ #
348
+ def track_cue_count(track)
349
+ obj, = find_element(visible = :all)
350
+ object_not_found_exception(obj, @type)
351
+ page.execute_script("return arguments[0].textTracks[#{track - 1}].cues.length", obj)
352
+ end
353
+
354
+ # Return cue text of active text track of associated media
355
+ #
356
+ # @return [String] cue text of active track
357
+ # @example
358
+ # caption = media_player.active_cue_text
359
+ #
360
+ def active_cue_text
361
+ active = active_track
362
+ return nil if active.zero?
363
+
364
+ cue_text(active)
365
+ end
366
+
367
+ # Return text cue of specified text track of associated media
368
+ #
369
+ # @param track [Integer] index of requested track
370
+ # @return [String] cue text of requested track
371
+ # @example
372
+ # caption = media_player.cue_text(2)
373
+ #
374
+ def cue_text(track)
375
+ obj, = find_element(visible = :all)
376
+ object_not_found_exception(obj, @type)
377
+ page.execute_script("return arguments[0].textTracks[#{track - 1}].activeCues[0].text", obj)
378
+ end
379
+
380
+ # Return properties of active text cue of associated media
381
+ #
382
+ # @return [Array of Hash] properties of active text cue (:text, :start, :end)
383
+ # @example
384
+ # cue_data = media_player.active_cue_data
385
+ #
386
+ def active_cue_data
387
+ active = active_track
388
+ return nil if active.zero?
389
+
390
+ obj, = find_element(visible = :all)
391
+ object_not_found_exception(obj, @type)
392
+ {
393
+ text: page.execute_script('return arguments[0].textTracks[0].activeCues[0].text', obj),
394
+ start: page.execute_script('return arguments[0].textTracks[0].activeCues[0].startTime', obj),
395
+ end: page.execute_script('return arguments[0].textTracks[0].activeCues[0].endTime', obj)
396
+ }
397
+ end
398
+
399
+ # Return all text cues of active track of associated media
400
+ #
401
+ # @return [Array of Hash] all text cues
402
+ # @example
403
+ # all_captions = media_player.all_cues_text
404
+ #
405
+ def all_cues_text
406
+ active = active_track
407
+ return nil if active.zero?
408
+
409
+ obj, = find_element(visible = :all)
410
+ object_not_found_exception(obj, @type)
411
+ num_cues = page.execute_script('return arguments[0].textTracks[0].cues.length', obj)
412
+ all_text = []
413
+ (1..num_cues).each do |cue|
414
+ all_text.push( { cue - 1 => page.execute_script("return arguments[0].textTracks[0].cues[#{cue - 1}].text", obj) })
415
+ end
416
+ all_text
417
+ end
418
+
419
+ # Return properties of all cues of active track of associated media
420
+ #
421
+ # @return [Array of Hash] properties of all active track cues (:text, :start, :end)
422
+ # @example
423
+ # cue_data = media_player.all_cues_data
424
+ #
425
+ def all_cues_data
426
+ active = active_track
427
+ return nil if active.zero?
428
+
429
+ obj, = find_element(visible = :all)
430
+ object_not_found_exception(obj, @type)
431
+ num_cues = page.execute_script('return arguments[0].textTracks[0].cues.length', obj)
432
+ all_data = []
433
+ (1..num_cues).each do |cue|
434
+ all_data.push(
435
+ { cue - 1 => {
436
+ text: page.execute_script("return arguments[0].textTracks[0].cues[#{cue - 1}].text", obj),
437
+ start: page.execute_script("return arguments[0].textTracks[0].cues[#{cue - 1}].startTime", obj),
438
+ end: page.execute_script("return arguments[0].textTracks[0].cues[#{cue - 1}].endTime", obj)
439
+ }
440
+ }
441
+ )
442
+ end
443
+ all_data
444
+ end
445
+
328
446
  # Set the media currentTime property
329
447
  #
330
448
  # @param value [Float] time in seconds
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.9
4
+ version: 4.6.11
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: 2025-10-31 00:00:00.000000000 Z
11
+ date: 2025-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: axe-core-cucumber
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement