testcentricity_web 4.6.8 → 4.6.10
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 +4 -4
- data/CHANGELOG.md +43 -0
- data/README.md +54 -45
- data/lib/testcentricity_web/data_objects/environment.rb +1 -1
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/page_objects_helper.rb +16 -0
- data/lib/testcentricity_web/web_core/webdriver_helper.rb +5 -8
- data/lib/testcentricity_web/web_elements/media.rb +121 -3
- data/lib/testcentricity_web/web_elements/table.rb +42 -0
- data/lib/testcentricity_web/web_elements/textfield.rb +0 -21
- data/lib/testcentricity_web/web_elements/ui_element.rb +30 -7
- metadata +18 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de6418809f79980fa606328879c38f0307e96d03d62abe5d1e1d2e7054a9a9fb
|
|
4
|
+
data.tar.gz: cb56e40775606d4d00557402656d98ff9e0b214d5bc58dad599bda6ed09c368a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0c860cb2b14e91a790c9fedbaceeb722cc480b3379abf8a30a691c8d57b3e1e900ce410c7eea2b5e8202f1bdfb2f405a7f78e06a9747cb36632f722f0ba8775
|
|
7
|
+
data.tar.gz: 4ad95f8ceedaa1acbebb5eb1869067b25a7eca38a6cc9daae6a68733d98913a21d0dc2db76e6cf9077df596db53ee060d5808c374b4dc1ec8bb64d3aca65fa7a
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,49 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## [4.6.10] - 07-NOV-2025
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
* Added the following `Media` methods to support verification of media text tracks (subtitles, captions,
|
|
10
|
+
chapters, descriptions, or metadata):
|
|
11
|
+
* `active_track_cue_count`
|
|
12
|
+
* `track_cue_count`
|
|
13
|
+
* `active_cue_text`
|
|
14
|
+
* `cue_text`
|
|
15
|
+
* `active_cue_data`
|
|
16
|
+
* `all_cues_text`
|
|
17
|
+
* `all_cues_data`
|
|
18
|
+
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of the following
|
|
19
|
+
`Media` properties:
|
|
20
|
+
* `:active_track_cue_count`
|
|
21
|
+
* `active_cue_text`
|
|
22
|
+
* `all_tracks_data`
|
|
23
|
+
* `active_cue_data`
|
|
24
|
+
* `all_cues_text`
|
|
25
|
+
* `all_cues_data`
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
* `Media.current_time` and `Media.duration` now return `Float` rounded to nearest tenth.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## [4.6.9] - 31-OCT-2025
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
* Added `Table.get_footer_columns` and `Table.get_footer_column`methods.
|
|
37
|
+
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of the following
|
|
38
|
+
`Table` properties:
|
|
39
|
+
* `:column_footers`
|
|
40
|
+
* `:column_footer`
|
|
41
|
+
* `:column_header`
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
* `UIElement.get_max` now works with HTML `<progress>` elements.
|
|
46
|
+
|
|
47
|
+
|
|
5
48
|
## [4.6.8] - 27-OCT-2025
|
|
6
49
|
|
|
7
50
|
### Changed
|
data/README.md
CHANGED
|
@@ -24,7 +24,7 @@ The TestCentricity™ For Web gem supports connecting to, and running automated
|
|
|
24
24
|
* [TestingBot](https://testingbot.com/features)
|
|
25
25
|
* [LambdaTest](https://www.lambdatest.com/selenium-automation)
|
|
26
26
|
* web portals utilizing JavaScript front end application frameworks like Ember, React, Angular, and GWT
|
|
27
|
-
* web pages containing HTML5 Video and Audio objects
|
|
27
|
+
* web pages containing HTML5 Video and Audio objects, including text caption tracks
|
|
28
28
|
* locally hosted emulated iOS Mobile Safari, Android, Windows Phone, or Blackberry mobile browsers (running within a local instance of Chrome)
|
|
29
29
|
|
|
30
30
|
|
|
@@ -40,15 +40,15 @@ Cucumber can be found [here](https://github.com/TestCentricity/tc_multi_webdrive
|
|
|
40
40
|
|
|
41
41
|
### Which gem should I use?
|
|
42
42
|
|
|
43
|
-
* The [TestCentricity For **Web** gem](https://rubygems.org/gems/testcentricity_web) supports testing of web
|
|
43
|
+
* The [TestCentricity For **Web** gem](https://rubygems.org/gems/testcentricity_web) supports testing of web apps via desktop and mobile web browsers
|
|
44
44
|
* The [TestCentricity For **Mobile** gem](https://rubygems.org/gems/testcentricity_mobile) supports testing of native iOS and Android mobile apps
|
|
45
45
|
* The [TestCentricity For **Apps** gem](https://rubygems.org/gems/testcentricity_apps) supports testing of MacOS desktop apps and native iOS and Android mobile apps
|
|
46
46
|
|
|
47
|
-
| Tested platforms
|
|
48
|
-
|
|
49
|
-
| Desktop/mobile web
|
|
50
|
-
| Native mobile iOS and/or Android apps only
|
|
51
|
-
| MacOS desktop apps
|
|
47
|
+
| Tested platforms | TestCentricity For Web | TestCentricity For Mobile | TestCentricity For Apps |
|
|
48
|
+
|--------------------------------------------|:----------------------:|:-------------------------:|:-----------------------:|
|
|
49
|
+
| Desktop/mobile web apps only | Yes | No | No |
|
|
50
|
+
| Native mobile iOS and/or Android apps only | No | Yes | Yes |
|
|
51
|
+
| MacOS desktop apps | No | No | Yes |
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
## Installation
|
|
@@ -784,39 +784,48 @@ The `verify_ui_states` method supports the following property/state pairs:
|
|
|
784
784
|
:rowcount Integer
|
|
785
785
|
:columncount Integer
|
|
786
786
|
:columnheaders Array of String
|
|
787
|
+
:columnfooters Array of String
|
|
787
788
|
:cell Hash
|
|
788
789
|
:row Hash
|
|
789
790
|
:column Hash
|
|
791
|
+
:column_header Hash
|
|
792
|
+
:column_footer Hash
|
|
790
793
|
:cell_attribute Integer, Float, or String
|
|
791
794
|
:row_attribute Integer, Float, or String
|
|
792
795
|
:aria_rowindex Integer
|
|
793
796
|
|
|
794
797
|
**Audio/Video Media Objects**
|
|
795
798
|
|
|
796
|
-
:autoplay
|
|
797
|
-
:ended
|
|
798
|
-
:controls
|
|
799
|
-
:loop
|
|
800
|
-
:muted
|
|
801
|
-
:default_muted
|
|
802
|
-
:paused
|
|
803
|
-
:seeking
|
|
804
|
-
:src
|
|
805
|
-
:current_time
|
|
806
|
-
:default_playback_rate
|
|
807
|
-
:duration
|
|
808
|
-
:playback_rate
|
|
809
|
-
:ready_state
|
|
810
|
-
:volume
|
|
811
|
-
:preload
|
|
812
|
-
:poster
|
|
813
|
-
:track_count
|
|
814
|
-
:active_track
|
|
815
|
-
:active_track_data
|
|
816
|
-
:all_tracks_data
|
|
817
|
-
:track_data
|
|
818
|
-
:active_track_source
|
|
819
|
-
:track_source
|
|
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
|
|
820
829
|
|
|
821
830
|
#### ARIA Accessibility Property/State Pairs
|
|
822
831
|
|
|
@@ -1460,7 +1469,7 @@ If the optional `options` hash is not provided when calling the `TestCentricity:
|
|
|
1460
1469
|
then **Environment Variables** must be used to specify the target local or remote web browser, and the various webdriver
|
|
1461
1470
|
capability parameters required to establish a connection with a single target web browser.
|
|
1462
1471
|
|
|
1463
|
-
### Specifying Options and Capabilities
|
|
1472
|
+
### Specifying Options and Capabilities using the `options` Hash
|
|
1464
1473
|
|
|
1465
1474
|
For those test scenarios requiring the instantiation of multiple WebDriver objects, or where cumbersome **Environment
|
|
1466
1475
|
Variables** are less than ideal, call the `TestCentricity::WebDriverConnect.initialize_web_driver` method with an `options`
|
|
@@ -1520,7 +1529,7 @@ expects a driver name, specified as a `Symbol`.
|
|
|
1520
1529
|
|
|
1521
1530
|
### Setting Desktop Browser Window Size
|
|
1522
1531
|
|
|
1523
|
-
#### Using `:browser_size`
|
|
1532
|
+
#### Using `:browser_size` using the `options` Hash
|
|
1524
1533
|
|
|
1525
1534
|
The size (width and height) of a desktop browser window can be specified in the `options` hash for browsers that are hosted
|
|
1526
1535
|
locally, in a Selenium Grid, or by a cloud hosted browser service provider. You cannot set the size of a mobile device web
|
|
@@ -1594,7 +1603,7 @@ the following Environment Variables must be set as described in the table below:
|
|
|
1594
1603
|
Refer to [**section 8.9 (Using Browser Specific Profiles in `cucumber.yml`)**](#using-browser-specific-profiles-in-cucumber-yml) below.
|
|
1595
1604
|
|
|
1596
1605
|
|
|
1597
|
-
#### Local Desktop Browser
|
|
1606
|
+
#### Local Desktop Browser using the `options` Hash
|
|
1598
1607
|
|
|
1599
1608
|
When using the `options` hash, the following options and capabilities must be specified:
|
|
1600
1609
|
- `driver:` must be set to `:webdriver`
|
|
@@ -1742,7 +1751,7 @@ then the following Environment Variables must be set as described in the table b
|
|
|
1742
1751
|
Refer to [**section 8.9 (Using Browser Specific Profiles in `cucumber.yml`)**](#using-browser-specific-profiles-in-cucumber-yml) below.
|
|
1743
1752
|
|
|
1744
1753
|
|
|
1745
|
-
#### Local Emulated Mobile Browser
|
|
1754
|
+
#### Local Emulated Mobile Browser using the `options` Hash
|
|
1746
1755
|
|
|
1747
1756
|
When using the `options` hash, the following options and capabilities must be specified:
|
|
1748
1757
|
- `driver:` must be set to `:webdriver`
|
|
@@ -1850,7 +1859,7 @@ then the following Environment Variables must be set as described in the table b
|
|
|
1850
1859
|
Refer to [**section 8.9 (Using Browser Specific Profiles in `cucumber.yml`)**](#using-browser-specific-profiles-in-cucumber-yml) below.
|
|
1851
1860
|
|
|
1852
1861
|
|
|
1853
|
-
#### Grid Browser
|
|
1862
|
+
#### Grid Browser using the `options` Hash
|
|
1854
1863
|
|
|
1855
1864
|
When using the `options` hash, the following options and capabilities must be specified:
|
|
1856
1865
|
- `driver:` must be set to `:grid`
|
|
@@ -1936,7 +1945,7 @@ from the Appium Server GUI app. A security violation error will occur without re
|
|
|
1936
1945
|
Refer to [**section 8.9 (Using Browser Specific Profiles in `cucumber.yml`)**](#using-browser-specific-profiles-in-cucumber-yml) below.
|
|
1937
1946
|
|
|
1938
1947
|
|
|
1939
|
-
##### Local Mobile Safari Browser
|
|
1948
|
+
##### Local Mobile Safari Browser using the `options` Hash
|
|
1940
1949
|
|
|
1941
1950
|
When using the `options` hash, the following options and capabilities must be specified:
|
|
1942
1951
|
- `driver:` must be set to `:appium`
|
|
@@ -2022,7 +2031,7 @@ the following **Environment Variables** must be set as described in the table be
|
|
|
2022
2031
|
Refer to [**section 8.9 (Using Browser Specific Profiles in `cucumber.yml`)**](#using-browser-specific-profiles-in-cucumber-yml) below.
|
|
2023
2032
|
|
|
2024
2033
|
|
|
2025
|
-
##### Local Mobile Android Browser
|
|
2034
|
+
##### Local Mobile Android Browser using the `options` Hash
|
|
2026
2035
|
|
|
2027
2036
|
When using the `options` hash, the following options and capabilities must be specified:
|
|
2028
2037
|
- `driver:` must be set to `:appium`
|
|
@@ -2184,7 +2193,7 @@ the following **Environment Variables** must be set as described in the table be
|
|
|
2184
2193
|
| `NETWORK_LOGS` | [Optional] Capture network logs (`true` or `false`) |
|
|
2185
2194
|
|
|
2186
2195
|
|
|
2187
|
-
##### BrowserStack Desktop Browser
|
|
2196
|
+
##### BrowserStack Desktop Browser using the `options` Hash
|
|
2188
2197
|
|
|
2189
2198
|
When using the `options` hash, the following options and capabilities must be specified:
|
|
2190
2199
|
- `driver:` must be set to `:browserstack`
|
|
@@ -2281,7 +2290,7 @@ the following **Environment Variables** must be set as described in the table be
|
|
|
2281
2290
|
| `APPIUM_LOGS` | [Optional] Generate Appium logs (`true` or `false`) |
|
|
2282
2291
|
|
|
2283
2292
|
|
|
2284
|
-
##### BrowserStack Mobile Browser
|
|
2293
|
+
##### BrowserStack Mobile Browser using the `options` Hash
|
|
2285
2294
|
|
|
2286
2295
|
When using the `options` hash, the following options and capabilities must be specified:
|
|
2287
2296
|
- `driver:` must be set to `:browserstack`
|
|
@@ -2371,7 +2380,7 @@ the following **Environment Variables** must be set as described in the table be
|
|
|
2371
2380
|
| `RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`) |
|
|
2372
2381
|
|
|
2373
2382
|
|
|
2374
|
-
##### Sauce Labs Desktop Browser
|
|
2383
|
+
##### Sauce Labs Desktop Browser using the `options` Hash
|
|
2375
2384
|
|
|
2376
2385
|
When using the `options` hash, the following options and capabilities must be specified:
|
|
2377
2386
|
- `driver:` must be set to `:saucelabs`
|
|
@@ -2457,7 +2466,7 @@ the following **Environment Variables** must be set as described in the table be
|
|
|
2457
2466
|
| `ORIENTATION` | [Optional] Set to `PORTRAIT` or `LANDSCAPE` |
|
|
2458
2467
|
|
|
2459
2468
|
|
|
2460
|
-
##### Sauce Labs Mobile Browser
|
|
2469
|
+
##### Sauce Labs Mobile Browser using the `options` Hash
|
|
2461
2470
|
|
|
2462
2471
|
When using the `options` hash, the following options and capabilities must be specified:
|
|
2463
2472
|
- `driver:` must be set to `:saucelabs`
|
|
@@ -2548,7 +2557,7 @@ the following **Environment Variables** must be set as described in the table be
|
|
|
2548
2557
|
| `BROWSER_SIZE` | [Optional] Specify width, height of browser window |
|
|
2549
2558
|
|
|
2550
2559
|
|
|
2551
|
-
##### TestingBot Desktop Browser
|
|
2560
|
+
##### TestingBot Desktop Browser using the `options` Hash
|
|
2552
2561
|
|
|
2553
2562
|
When using the `options` hash, the following options and capabilities must be specified:
|
|
2554
2563
|
- `driver:` must be set to `:testingbot`
|
|
@@ -2628,7 +2637,7 @@ the following **Environment Variables** must be set as described in the table be
|
|
|
2628
2637
|
| `ORIENTATION` | [Optional] Set to `portrait` or `landscape` |
|
|
2629
2638
|
|
|
2630
2639
|
|
|
2631
|
-
##### TestingBot Mobile Browser
|
|
2640
|
+
##### TestingBot Mobile Browser using the `options` Hash
|
|
2632
2641
|
|
|
2633
2642
|
When using the `options` hash, the following options and capabilities must be specified:
|
|
2634
2643
|
- `driver:` must be set to `:testingbot`
|
|
@@ -2711,7 +2720,7 @@ the following **Environment Variables** must be set as described in the table be
|
|
|
2711
2720
|
| `CONSOLE_LOGS` | [Optional] Used to capture browser console logs. |
|
|
2712
2721
|
|
|
2713
2722
|
|
|
2714
|
-
##### LambdaTest Desktop Browser
|
|
2723
|
+
##### LambdaTest Desktop Browser using the `options` Hash
|
|
2715
2724
|
|
|
2716
2725
|
When using the `options` hash, the following options and capabilities must be specified:
|
|
2717
2726
|
- `driver:` must be set to `:lambdatest`
|
|
@@ -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?
|
|
@@ -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
|
|
@@ -165,6 +175,8 @@ module TestCentricity
|
|
|
165
175
|
ui_object.get_group_headings
|
|
166
176
|
when :column_headers
|
|
167
177
|
ui_object.get_header_columns
|
|
178
|
+
when :column_footers
|
|
179
|
+
ui_object.get_footer_columns
|
|
168
180
|
when :count, :count_visible
|
|
169
181
|
ui_object.count(visible = true)
|
|
170
182
|
when :all_items, :all_list_items
|
|
@@ -281,6 +293,10 @@ module TestCentricity
|
|
|
281
293
|
ui_object.get_table_row(value.to_i)
|
|
282
294
|
when :column
|
|
283
295
|
ui_object.get_table_column(value.to_i)
|
|
296
|
+
when :column_header
|
|
297
|
+
ui_object.get_header_column(value.to_i)
|
|
298
|
+
when :column_footer
|
|
299
|
+
ui_object.get_footer_column(value.to_i)
|
|
284
300
|
when :item
|
|
285
301
|
ui_object.get_list_item(value.to_i)
|
|
286
302
|
when :attribute
|
|
@@ -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
|
|
@@ -432,7 +431,6 @@ module TestCentricity
|
|
|
432
431
|
end
|
|
433
432
|
# specify endpoint url
|
|
434
433
|
@endpoint = "https://#{ENV['BS_USERNAME']}:#{ENV['BS_AUTHKEY']}@hub-cloud.browserstack.com/wd/hub" if @endpoint.nil?
|
|
435
|
-
# :nocov:
|
|
436
434
|
# enable tunneling if specified
|
|
437
435
|
if ENV['TUNNELING']
|
|
438
436
|
@bs_local = BrowserStack::Local.new
|
|
@@ -444,7 +442,6 @@ module TestCentricity
|
|
|
444
442
|
puts 'BrowserStack Local instance failed to start'
|
|
445
443
|
end
|
|
446
444
|
end
|
|
447
|
-
# :nocov:
|
|
448
445
|
# define BrowserStack options
|
|
449
446
|
options = if @capabilities.nil?
|
|
450
447
|
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(
|
|
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(
|
|
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
|
|
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
|
|
@@ -8,6 +8,9 @@ module TestCentricity
|
|
|
8
8
|
attr_accessor :table_header
|
|
9
9
|
attr_accessor :header_row
|
|
10
10
|
attr_accessor :header_column
|
|
11
|
+
attr_accessor :table_footer
|
|
12
|
+
attr_accessor :footer_row
|
|
13
|
+
attr_accessor :footer_column
|
|
11
14
|
attr_accessor :row_header
|
|
12
15
|
attr_accessor :tree_expand
|
|
13
16
|
attr_accessor :tree_collapse
|
|
@@ -24,6 +27,9 @@ module TestCentricity
|
|
|
24
27
|
table_header: 'thead',
|
|
25
28
|
header_row: 'tr',
|
|
26
29
|
header_column: 'th',
|
|
30
|
+
table_footer: 'tfoot',
|
|
31
|
+
footer_row: 'tr',
|
|
32
|
+
footer_column: 'th',
|
|
27
33
|
row_header: nil
|
|
28
34
|
}
|
|
29
35
|
|
|
@@ -55,6 +61,12 @@ module TestCentricity
|
|
|
55
61
|
@header_row = value
|
|
56
62
|
when :header_column
|
|
57
63
|
@header_column = value
|
|
64
|
+
when :table_footer
|
|
65
|
+
@table_footer = value
|
|
66
|
+
when :footer_row
|
|
67
|
+
@footer_row = value
|
|
68
|
+
when :footer_column
|
|
69
|
+
@footer_column = value
|
|
58
70
|
when :row_header
|
|
59
71
|
@row_header = value
|
|
60
72
|
when :tree_expand
|
|
@@ -576,6 +588,36 @@ module TestCentricity
|
|
|
576
588
|
columns
|
|
577
589
|
end
|
|
578
590
|
|
|
591
|
+
def get_footer_column(column)
|
|
592
|
+
column_count = get_column_count
|
|
593
|
+
raise "Column #{column} exceeds number of columns (#{column_count}) in table footer #{object_ref_message}" if column > column_count
|
|
594
|
+
case @locator_type
|
|
595
|
+
when :xpath
|
|
596
|
+
set_alt_locator("#{@locator}//#{@table_footer}/#{@footer_row}/#{@footer_column}[#{column}]")
|
|
597
|
+
when :css
|
|
598
|
+
set_alt_locator("#{@locator} #{@table_footer} > #{@footer_row} > #{@footer_column}:nth-of-type(#{column})")
|
|
599
|
+
end
|
|
600
|
+
value = get_value(:all) if exists?(:all)
|
|
601
|
+
clear_alt_locator
|
|
602
|
+
value
|
|
603
|
+
end
|
|
604
|
+
|
|
605
|
+
def get_footer_columns
|
|
606
|
+
columns = []
|
|
607
|
+
column_count = get_column_count
|
|
608
|
+
(1..column_count).each do |column|
|
|
609
|
+
case @locator_type
|
|
610
|
+
when :xpath
|
|
611
|
+
set_alt_locator("#{@locator}//#{@table_footer}/#{@footer_row}/#{@footer_column}[#{column}]")
|
|
612
|
+
when :css
|
|
613
|
+
set_alt_locator("#{@locator} #{@table_footer} > #{@footer_row} > #{@footer_column}:nth-of-type(#{column})")
|
|
614
|
+
end
|
|
615
|
+
columns.push(get_value(:all)) if exists?(:all)
|
|
616
|
+
end
|
|
617
|
+
clear_alt_locator
|
|
618
|
+
columns
|
|
619
|
+
end
|
|
620
|
+
|
|
579
621
|
def is_table_row_expanded?(row, column)
|
|
580
622
|
row_count = get_row_count
|
|
581
623
|
raise "Row #{row} exceeds number of rows (#{row_count}) in table #{object_ref_message}" if row > row_count
|
|
@@ -92,27 +92,6 @@ module TestCentricity
|
|
|
92
92
|
end
|
|
93
93
|
end
|
|
94
94
|
|
|
95
|
-
# Return max attribute of a number type text field.
|
|
96
|
-
#
|
|
97
|
-
# @return [Integer]
|
|
98
|
-
# @example
|
|
99
|
-
# max_points_value = points_field.get_max
|
|
100
|
-
#
|
|
101
|
-
def get_max
|
|
102
|
-
obj, = find_element
|
|
103
|
-
object_not_found_exception(obj, nil)
|
|
104
|
-
max = obj.native.attribute('max')
|
|
105
|
-
unless max.blank?
|
|
106
|
-
if max.is_int?
|
|
107
|
-
max.to_i
|
|
108
|
-
elsif max.is_float?
|
|
109
|
-
max.to_f
|
|
110
|
-
else
|
|
111
|
-
max
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
end
|
|
115
|
-
|
|
116
95
|
# Return step attribute of a number type text field.
|
|
117
96
|
#
|
|
118
97
|
# @return [Integer]
|
|
@@ -577,13 +577,15 @@ module TestCentricity
|
|
|
577
577
|
def get_value(visible = true)
|
|
578
578
|
obj, type = find_element(visible)
|
|
579
579
|
object_not_found_exception(obj, type)
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
580
|
+
value = case obj.tag_name.downcase
|
|
581
|
+
when 'input', 'select', 'textarea'
|
|
582
|
+
obj.value
|
|
583
|
+
when 'progress'
|
|
584
|
+
obj.value.to_i
|
|
585
|
+
else
|
|
586
|
+
obj.text
|
|
587
|
+
end
|
|
588
|
+
value.is_a?(String) ? value.gsub(/[[:space:]]+/, ' ').strip : value
|
|
587
589
|
end
|
|
588
590
|
|
|
589
591
|
alias get_caption get_value
|
|
@@ -700,6 +702,27 @@ module TestCentricity
|
|
|
700
702
|
)
|
|
701
703
|
end
|
|
702
704
|
|
|
705
|
+
# Return max attribute of a number type text field or a progress bar.
|
|
706
|
+
#
|
|
707
|
+
# @return [Integer]
|
|
708
|
+
# @example
|
|
709
|
+
# max_points_value = points_field.get_max
|
|
710
|
+
#
|
|
711
|
+
def get_max
|
|
712
|
+
obj, = find_element
|
|
713
|
+
object_not_found_exception(obj, nil)
|
|
714
|
+
max = obj.native.attribute('max')
|
|
715
|
+
unless max.blank?
|
|
716
|
+
if max.is_int?
|
|
717
|
+
max.to_i
|
|
718
|
+
elsif max.is_float?
|
|
719
|
+
max.to_f
|
|
720
|
+
else
|
|
721
|
+
max
|
|
722
|
+
end
|
|
723
|
+
end
|
|
724
|
+
end
|
|
725
|
+
|
|
703
726
|
# Return UI object's style property
|
|
704
727
|
#
|
|
705
728
|
# @return [String]
|
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.
|
|
4
|
+
version: 4.6.10
|
|
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-
|
|
11
|
+
date: 2025-11-07 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
|
|
@@ -142,14 +156,14 @@ dependencies:
|
|
|
142
156
|
requirements:
|
|
143
157
|
- - "~>"
|
|
144
158
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: 4.
|
|
159
|
+
version: 4.38.0
|
|
146
160
|
type: :development
|
|
147
161
|
prerelease: false
|
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
163
|
requirements:
|
|
150
164
|
- - "~>"
|
|
151
165
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: 4.
|
|
166
|
+
version: 4.38.0
|
|
153
167
|
- !ruby/object:Gem::Dependency
|
|
154
168
|
name: simplecov
|
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|