testcentricity_web 4.1.10 → 4.2.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 +4 -4
- data/CHANGELOG.md +75 -1
- data/README.md +73 -35
- data/lib/testcentricity_web/data_objects/environment.rb +0 -1
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/page_objects_helper.rb +39 -2
- data/lib/testcentricity_web/web_core/webdriver_helper.rb +67 -61
- data/lib/testcentricity_web/web_elements/media.rb +108 -0
- data/lib/testcentricity_web/web_elements/textfield.rb +28 -0
- data/lib/testcentricity_web/web_elements/ui_elements_helper.rb +39 -1
- metadata +6 -150
- data/.gitignore +0 -39
- data/.idea/.name +0 -1
- data/.idea/encodings.xml +0 -6
- data/.idea/misc.xml +0 -4
- data/.idea/modules.xml +0 -8
- data/.idea/vcs.xml +0 -7
- data/.rspec +0 -4
- data/.rubocop.yml +0 -38
- data/.ruby-version +0 -1
- data/.simplecov +0 -9
- data/CODE_OF_CONDUCT.md +0 -13
- data/Gemfile +0 -6
- data/Rakefile +0 -115
- data/config/cucumber.yml +0 -171
- data/config/locales/en-US.yml +0 -56
- data/config/test_data/LOCAL_data.json +0 -15
- data/config/test_data/LOCAL_data.xls +0 -0
- data/config/test_data/LOCAL_data.yml +0 -11
- data/config/test_data/data.json +0 -25
- data/config/test_data/data.xls +0 -0
- data/config/test_data/data.yml +0 -20
- data/docker-compose.yml +0 -48
- data/features/basic_form_page_css.feature +0 -54
- data/features/basic_form_page_xpath.feature +0 -26
- data/features/custom_controls.feature +0 -29
- data/features/media_players.feature +0 -67
- data/features/step_definitions/generic_steps.rb.rb +0 -124
- data/features/step_definitions/media_steps.rb +0 -30
- data/features/support/data/form_data.rb +0 -43
- data/features/support/env.rb +0 -53
- data/features/support/hooks.rb +0 -270
- data/features/support/pages/base_test_page.rb +0 -22
- data/features/support/pages/basic_css_form_page.rb +0 -57
- data/features/support/pages/basic_form_page.rb +0 -500
- data/features/support/pages/basic_xpath_form_page.rb +0 -58
- data/features/support/pages/custom_controls_page.rb +0 -263
- data/features/support/pages/indexed_sections_page.rb +0 -57
- data/features/support/pages/media_test_page.rb +0 -207
- data/features/support/sections/header_nav.rb +0 -48
- data/features/support/sections/product_card.rb +0 -39
- data/features/support/world_data.rb +0 -12
- data/features/support/world_pages.rb +0 -18
- data/reports/.keep +0 -1
- data/spec/fixtures/page_object.rb +0 -22
- data/spec/fixtures/section_object.rb +0 -21
- data/spec/spec_helper.rb +0 -33
- data/spec/testcentricity_web/browser_spec.rb +0 -41
- data/spec/testcentricity_web/elements/audio_spec.rb +0 -68
- data/spec/testcentricity_web/elements/button_spec.rb +0 -18
- data/spec/testcentricity_web/elements/checkbox_spec.rb +0 -33
- data/spec/testcentricity_web/elements/file_field_spec.rb +0 -13
- data/spec/testcentricity_web/elements/image_spec.rb +0 -33
- data/spec/testcentricity_web/elements/label_spec.rb +0 -18
- data/spec/testcentricity_web/elements/link_spec.rb +0 -23
- data/spec/testcentricity_web/elements/list_spec.rb +0 -13
- data/spec/testcentricity_web/elements/radio_spec.rb +0 -28
- data/spec/testcentricity_web/elements/ui_element_spec.rb +0 -125
- data/spec/testcentricity_web/elements/video_spec.rb +0 -68
- data/spec/testcentricity_web/helper_specs/object_helpers_spec.rb +0 -39
- data/spec/testcentricity_web/helper_specs/string_helpers_spec.rb +0 -49
- data/spec/testcentricity_web/page_object_spec.rb +0 -90
- data/spec/testcentricity_web/section_object_spec.rb +0 -72
- data/spec/testcentricity_web/version_spec.rb +0 -7
- data/spec/testcentricity_web/webdriver_connect/grid_webdriver_spec.rb +0 -72
- data/spec/testcentricity_web/webdriver_connect/local_webdriver_spec.rb +0 -86
- data/spec/testcentricity_web/webdriver_connect/mobile_webdriver_spec.rb +0 -65
- data/test_site/basic_test_page.html +0 -269
- data/test_site/chosen/chosen-sprite.png +0 -0
- data/test_site/chosen/chosen-sprite@2x.png +0 -0
- data/test_site/chosen/chosen.css +0 -496
- data/test_site/chosen/chosen.jquery.js +0 -1359
- data/test_site/chosen/chosen.jquery.min.js +0 -3
- data/test_site/chosen/chosen.min.css +0 -11
- data/test_site/chosen/chosen.proto.js +0 -1399
- data/test_site/chosen/chosen.proto.min.js +0 -3
- data/test_site/chosen/composer.json +0 -36
- data/test_site/custom_controls_page.html +0 -629
- data/test_site/docsupport/chosen.png +0 -0
- data/test_site/docsupport/init.js +0 -11
- data/test_site/docsupport/init.proto.js +0 -16
- data/test_site/docsupport/jquery-1.12.4.min.js +0 -5
- data/test_site/docsupport/jquery-3.2.1.min.js +0 -4
- data/test_site/docsupport/oss-credit.png +0 -0
- data/test_site/docsupport/prism.css +0 -108
- data/test_site/docsupport/prism.js +0 -9
- data/test_site/docsupport/prototype-1.7.0.0.js +0 -6082
- data/test_site/docsupport/style.css +0 -219
- data/test_site/images/Blouse_Black.jpg +0 -0
- data/test_site/images/Granny.jpg +0 -0
- data/test_site/images/Printed_Dress.jpg +0 -0
- data/test_site/images/T-shirt.jpg +0 -0
- data/test_site/images/Wilder.jpg +0 -0
- data/test_site/images/You_Betcha.jpg +0 -0
- data/test_site/images/jeans3.jpg +0 -0
- data/test_site/indexed_sections_page.html +0 -215
- data/test_site/media/MIB2-subtitles-pt-BR.vtt +0 -49
- data/test_site/media/MIB2.mp4 +0 -0
- data/test_site/media/MP4_small.mp4 +0 -0
- data/test_site/media/MPS_sample.mp3 +0 -0
- data/test_site/media/bbc_scotland_report.mp3 +0 -0
- data/test_site/media/count_and_bars.mp4 +0 -0
- data/test_site/media_page.html +0 -86
- data/testcentricity_web.gemspec +0 -59
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6bba95ce17cd2e367f22261389fbe57cf7599ad7c8b376d293713929363dc7b2
|
|
4
|
+
data.tar.gz: e0e50d77d9e41d22652d6345820ef4258c31ff8e0ec63171fcfd6bba4bf8da17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab4055f869598ce042c6b62172b8a89e9632268593dfcfec4cf4c7b401cfd66c3dfbfdd177f046aa429f80f575dd88558be187447cfcecd7ab2a32fa355cff78
|
|
7
|
+
data.tar.gz: 3c0581ac5599a71203eeb592f919de7a539ebb0855a2e3dd72cf9de2ae9a4ca69ecb7bf7b408a1540a432c1358337803ddc84eaf8d1827d6033904aa35f9e542
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,81 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## [4.2.6] - 12-JUNE-2022
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
* Fix `gemspec` to no longer include specs and cuke tests as part of deployment package for gem.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## [4.2.5] - 10-JUNE-2022
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
*`WebDriverConnect.initialize_web_driver` method no longer raises `No such file or directory @ dir_s_mkdir` error due to
|
|
15
|
+
missing `Downloads` folder when running tests in parallel.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [4.2.4] - 02-JUNE-2022
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
* Added `UIElement.wait_until_enabled` method
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [4.2.3] - 01-JUNE-2022
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
* Added `UIElement.wait_while_busy` method
|
|
28
|
+
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of `aria_busy` attribute.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## [4.2.2] - 21-MAY-2022
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
* Update default version of Appium used when running tests on Sauce Labs service.
|
|
35
|
+
* Refactored capabilities definition when running with locally hosted Appium instance.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [4.2.1] - 23-APR-2022
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
* Added the following `Audio`, `Media`, and `Video` methods to support verification of media text tracks (subtitles, captions,
|
|
42
|
+
chapters, descriptions, or metadata):
|
|
43
|
+
* `track_count`
|
|
44
|
+
* `active_track`
|
|
45
|
+
* `active_track_data`
|
|
46
|
+
* `all_tracks_data`
|
|
47
|
+
* `track_data`
|
|
48
|
+
* `active_track_source`
|
|
49
|
+
* `track_source`
|
|
50
|
+
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of the following
|
|
51
|
+
`Media` properties:
|
|
52
|
+
* `:track_count`
|
|
53
|
+
* `:active_track`
|
|
54
|
+
* `:active_track_data`
|
|
55
|
+
* `:all_tracks_data`
|
|
56
|
+
* `:track_data`
|
|
57
|
+
* `:active_track_source`
|
|
58
|
+
* `:track_source`
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
## [4.2.0] - 20-APR-2022
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
* `TextField.validation_message` and `TextField.validity?` methods added.
|
|
65
|
+
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of the following
|
|
66
|
+
`TextField.validity?` properties:
|
|
67
|
+
* `:badInput`
|
|
68
|
+
* `:customError`
|
|
69
|
+
* `:patternMismatch`
|
|
70
|
+
* `:rangeOverflow`
|
|
71
|
+
* `:rangeUnderflow`
|
|
72
|
+
* `:stepMismatch`
|
|
73
|
+
* `:tooLong`
|
|
74
|
+
* `:tooShort`
|
|
75
|
+
* `:typeMismatch`
|
|
76
|
+
* `:valid`
|
|
77
|
+
* `:valueMissing`
|
|
78
|
+
|
|
79
|
+
|
|
5
80
|
## [4.1.10] - 19-APR-2022
|
|
6
81
|
|
|
7
82
|
### Fixed
|
|
@@ -19,7 +94,6 @@ running gem test specs and features.
|
|
|
19
94
|
radio buttons to the unchecked state.
|
|
20
95
|
|
|
21
96
|
### Added
|
|
22
|
-
|
|
23
97
|
* `CheckBox.define_custom_elements` and `Radio.define_custom_elements` methods now support specifying a child `input` component
|
|
24
98
|
contained by a top level `label` element.
|
|
25
99
|
|
data/README.md
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
# TestCentricity™ Web
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/rb/testcentricity_web) [](http://opensource.org/licenses/BSD-3-Clause)
|
|
4
|
+
 
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
The TestCentricity™ Web core
|
|
7
|
-
|
|
7
|
+
The TestCentricity™ Web core framework for desktop and mobile web browser-based app testing implements a Page Object Model DSL for use
|
|
8
|
+
with Cucumber (version 7.x or greater), Capybara (version 3.x), and Selenium-Webdriver (version 4.x). It also facilitates the configuration of the appropriate
|
|
8
9
|
Selenium-Webdriver capabilities required to establish a connection with a local or cloud hosted desktop or mobile web browser.
|
|
9
10
|
|
|
10
11
|
The TestCentricity™ Web gem supports running automated tests against the following web test targets:
|
|
11
12
|
* locally hosted desktop browsers (Chrome, Edge, Firefox, Safari, or IE)
|
|
12
13
|
* locally hosted "headless" Chrome, Firefox, or Edge browsers
|
|
13
14
|
* remote desktop and emulated mobile web browsers hosted on Selenium Grid 4 and Dockerized Selenium Grid 4 environments
|
|
14
|
-
* mobile Safari browsers on iOS device simulators or physical iOS devices (using Appium and XCode on
|
|
15
|
-
* mobile Chrome or Android browsers on Android Studio virtual device emulators (using Appium and Android Studio on
|
|
15
|
+
* mobile Safari browsers on iOS device simulators or physical iOS devices (using Appium and XCode on macOS)
|
|
16
|
+
* mobile Chrome or Android browsers on Android Studio virtual device emulators (using Appium and Android Studio on macOS)
|
|
16
17
|
* cloud hosted desktop (Firefox, Chrome, Safari, IE, or Edge) or mobile (iOS Mobile Safari or Android) web browsers using the following service:
|
|
17
18
|
* [Browserstack](https://www.browserstack.com/list-of-browsers-and-platforms?product=automate)
|
|
18
19
|
* [Sauce Labs](https://saucelabs.com/open-source#automated-testing-platform)
|
|
@@ -29,13 +30,14 @@ A complete history of bug fixes and new features can be found in the {file:CHANG
|
|
|
29
30
|
|
|
30
31
|
The RubyDocs for this gem can be found [here](https://www.rubydoc.info/gems/testcentricity_web).
|
|
31
32
|
|
|
32
|
-
An example project that demonstrates the implementation of a page object model framework using Cucumber and TestCentricity™
|
|
33
|
+
An example project that demonstrates the implementation of a page object model framework using Cucumber and TestCentricity™ Web
|
|
33
34
|
can be found [here](https://github.com/TestCentricity/tc_web_sample).
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
## Installation
|
|
37
38
|
|
|
38
|
-
TestCentricity version 4.1 and above requires Ruby 2.7 or later. To install the TestCentricity gem, add this line to your
|
|
39
|
+
TestCentricity Web version 4.1 and above requires Ruby 2.7.5 or later. To install the TestCentricity Web gem, add this line to your
|
|
40
|
+
automation project's Gemfile:
|
|
39
41
|
|
|
40
42
|
gem 'testcentricity_web'
|
|
41
43
|
|
|
@@ -59,7 +61,7 @@ If you are using Cucumber, you need to require the following in your `env.rb` fi
|
|
|
59
61
|
|
|
60
62
|
### Using RSpec
|
|
61
63
|
|
|
62
|
-
If you are using RSpec instead, you need to require the following in your `
|
|
64
|
+
If you are using RSpec instead, you need to require the following in your `spec_helper.rb` file:
|
|
63
65
|
|
|
64
66
|
require 'capybara'
|
|
65
67
|
require 'capybara/rspec'
|
|
@@ -69,7 +71,7 @@ If you are using RSpec instead, you need to require the following in your `env.r
|
|
|
69
71
|
### Using Appium
|
|
70
72
|
|
|
71
73
|
If you will be running your tests on mobile Safari browsers on simulated iOS devices using Appium and XCode Simulators, you need to require
|
|
72
|
-
the following in your `env.rb` file:
|
|
74
|
+
the following in your `env.rb` and/or `spec_helper.rb` file:
|
|
73
75
|
|
|
74
76
|
require 'appium_capybara'
|
|
75
77
|
|
|
@@ -118,22 +120,22 @@ Web pages typically have names and URLs associated with them. Web pages also typ
|
|
|
118
120
|
indicates that the page's contents have fully loaded.
|
|
119
121
|
|
|
120
122
|
The `page_name` trait is registered with the `PageManager` object, which includes a `find_page` method that takes a page name as a
|
|
121
|
-
parameter and returns an instance of the associated `
|
|
123
|
+
parameter and returns an instance of the associated `PageObject`. If you intend to use the `PageManager`, you must define a `page_name`
|
|
122
124
|
trait for each `PageObject` to be registered.
|
|
123
125
|
|
|
124
126
|
The `page_name` trait is usually a `String` value that represents the name of the page that will be matched by the `PageManager.findpage` method.
|
|
125
127
|
`page_name` traits are case and white-space sensitive. For pages that may be referenced with multiple names, the `page_name` trait may also be
|
|
126
128
|
an `Array` of `String` values representing those page names.
|
|
127
129
|
|
|
130
|
+
A `page_locator` trait is defined if a page has a unique object or attribute that exists once the page's contents have fully loaded. The
|
|
131
|
+
`page_locator` trait is a CSS or Xpath expression that uniquely identifies the object or attribute. The `verify_page_exists` method waits
|
|
132
|
+
for the `page_locator` trait to exist.
|
|
133
|
+
|
|
128
134
|
A `page_url` trait should be defined if a page can be directly loaded using a URL. If you set Capybara's `app_host`, or specify a base URL
|
|
129
135
|
when calling the `WebDriverConnect.initialize_web_driver` method, then your `page_url` trait can be the relative URL slug that will
|
|
130
136
|
be appended to the base URL specified in `app_host`. Specifying a `page_url` trait is optional, as not all web pages can be directly loaded
|
|
131
137
|
via a URL.
|
|
132
138
|
|
|
133
|
-
A `page_locator` trait is defined if a page has a unique object or attribute that exists once the page's contents have fully loaded. The
|
|
134
|
-
`page_locator` trait is a CSS or Xpath expression that uniquely identifies the object or attribute. The `verify_page_exists` method waits
|
|
135
|
-
for the `page_locator` trait to exist.
|
|
136
|
-
|
|
137
139
|
You define your page's **Traits** as shown below:
|
|
138
140
|
|
|
139
141
|
class LoginPage < TestCentricity::PageObject
|
|
@@ -387,8 +389,7 @@ You add a `PageSection` to its associated `PageObject` as shown below:
|
|
|
387
389
|
Once your `PageObject` has been instantiated, you can call its `PageSection` methods as shown below:
|
|
388
390
|
|
|
389
391
|
home_page.search_form.search_for('ocarina')
|
|
390
|
-
|
|
391
|
-
|
|
392
|
+
|
|
392
393
|
|
|
393
394
|
## UIElements
|
|
394
395
|
|
|
@@ -402,9 +403,9 @@ all UI elements are based on the `UIElement` class.
|
|
|
402
403
|
|
|
403
404
|
Single `UIElement` declarations have the following format:
|
|
404
405
|
|
|
405
|
-
elementType :
|
|
406
|
+
elementType :elementName, locator
|
|
406
407
|
|
|
407
|
-
* The `
|
|
408
|
+
* The `elementName` is the unique name that you will use to refer to the UI element and is specified as a `Symbol`.
|
|
408
409
|
* The `locator` is the CSS or XPath attribute that uniquely and unambiguously identifies the `UIElement`.
|
|
409
410
|
|
|
410
411
|
Multiple `UIElement` declarations for a collection of elements of the same type can be performed by passing a hash table containing the
|
|
@@ -475,8 +476,8 @@ Supported `UIElement` elementTypes and their declarations have the following for
|
|
|
475
476
|
|
|
476
477
|
|
|
477
478
|
Refer to the Class List documentation for the `PageObject` and `PageSection` classes for details on the class methods used for declaring
|
|
478
|
-
and instantiating `UIElements`. Examples of UI element declarations can be found in the ***Adding UI Elements to your
|
|
479
|
-
***Adding UI Elements to your PageSection
|
|
479
|
+
and instantiating `UIElements`. Examples of UI element declarations can be found in the ***Adding UI Elements to your PageObject*** and
|
|
480
|
+
***Adding UI Elements to your PageSection*** sections above.
|
|
480
481
|
|
|
481
482
|
|
|
482
483
|
### UIElement Inherited Methods
|
|
@@ -526,8 +527,10 @@ With TestCentricity, all UI elements are based on the `UIElement` class, and inh
|
|
|
526
527
|
element.wait_until_gone(seconds)
|
|
527
528
|
element.wait_until_visible(seconds)
|
|
528
529
|
element.wait_until_hidden(seconds)
|
|
530
|
+
element.wait_until_enabled(seconds)
|
|
529
531
|
element.wait_until_value_is(value, seconds)
|
|
530
532
|
element.wait_until_value_changes(seconds)
|
|
533
|
+
element.wait_while_busy(seconds)
|
|
531
534
|
|
|
532
535
|
**WAI-ARIA Object Accessibility (A11y) methods:**
|
|
533
536
|
|
|
@@ -581,7 +584,7 @@ of a hex color `String`. For `section` objects, data values must be a `String`,
|
|
|
581
584
|
The `populate_data_fields` method verifies that data attributes associated with each `UIElement` is not `nil` or `empty` before attempting to
|
|
582
585
|
enter data into the `UIElement`.
|
|
583
586
|
|
|
584
|
-
The optional `wait_time` parameter is used to specify the time (in seconds) to wait for each `UIElement` to become
|
|
587
|
+
The optional `wait_time` parameter is used to specify the time (in seconds) to wait for each `UIElement` to become viable for data entry
|
|
585
588
|
(the `UIElement` must be visible and enabled) before entering the associated data value. This option is useful in situations where entering data,
|
|
586
589
|
or setting the state of a `UIElement` might cause other `UIElements` to become visible or active. Specifying a wait_time value ensures that the
|
|
587
590
|
subsequent `UIElements` will be ready to be interacted with as states are changed. If the wait time is `nil`, then the wait time will be 5 seconds.
|
|
@@ -659,6 +662,21 @@ The `verify_ui_states` method supports the following property/state pairs:
|
|
|
659
662
|
:max Integer
|
|
660
663
|
:step Integer
|
|
661
664
|
|
|
665
|
+
Text Field Constraint validation
|
|
666
|
+
|
|
667
|
+
:validation_message String
|
|
668
|
+
:badInput Boolean
|
|
669
|
+
:customError Boolean
|
|
670
|
+
:patternMismatch Boolean
|
|
671
|
+
:rangeOverflow Boolean
|
|
672
|
+
:rangeUnderflow Boolean
|
|
673
|
+
:stepMismatch Boolean
|
|
674
|
+
:tooLong Boolean
|
|
675
|
+
:tooShort Boolean
|
|
676
|
+
:typeMismatch Boolean
|
|
677
|
+
:valid Boolean
|
|
678
|
+
:valueMissing Boolean
|
|
679
|
+
|
|
662
680
|
**Checkboxes:**
|
|
663
681
|
|
|
664
682
|
:checked Boolean
|
|
@@ -722,6 +740,13 @@ The `verify_ui_states` method supports the following property/state pairs:
|
|
|
722
740
|
:volume Float
|
|
723
741
|
:preload String
|
|
724
742
|
:poster String
|
|
743
|
+
:track_count Integer
|
|
744
|
+
:active_track Integer
|
|
745
|
+
:active_track_data Hash
|
|
746
|
+
:all_tracks_data Array of Hash
|
|
747
|
+
:track_data Hash
|
|
748
|
+
:active_track_source String
|
|
749
|
+
:track_source String
|
|
725
750
|
|
|
726
751
|
#### ARIA accessibility property/state pairs
|
|
727
752
|
|
|
@@ -740,6 +765,7 @@ The `verify_ui_states` method supports the following ARIA accessibility property
|
|
|
740
765
|
:aria_checked Boolean
|
|
741
766
|
:aria_readonly Boolean
|
|
742
767
|
:aria_pressed Boolean
|
|
768
|
+
:aria_busy Boolean
|
|
743
769
|
:aria_haspopup Boolean
|
|
744
770
|
:aria_sort String
|
|
745
771
|
:aria_rowcount String
|
|
@@ -1022,7 +1048,7 @@ cumbersome to manage if your web application has dozens of `PageObjects` that ne
|
|
|
1022
1048
|
### Using the PageManager
|
|
1023
1049
|
|
|
1024
1050
|
The `PageManager` class provides methods for supporting the instantiation and management of `PageObjects`. In the code example below,
|
|
1025
|
-
the `page_objects` method contains a hash table of your `PageObject` instances and their associated `PageObject`
|
|
1051
|
+
the `page_objects` method contains a hash table of your `PageObject` instances and their associated `PageObject` classes to be
|
|
1026
1052
|
instantiated by `PageManager`:
|
|
1027
1053
|
|
|
1028
1054
|
module WorldPages
|
|
@@ -1161,24 +1187,24 @@ The `TestCentricity::WebDriverConnect.initialize_web_driver` method configures t
|
|
|
1161
1187
|
establish a connection with a target web browser, and sets the base host URL of the web site you are running your tests against.
|
|
1162
1188
|
|
|
1163
1189
|
The `TestCentricity::WebDriverConnect.initialize_web_driver` method accepts a single optional parameter - the base host URL. Cucumber
|
|
1164
|
-
**Environment Variables** are used to specify the target local or remote web browser, and the various webdriver capability parameters required
|
|
1165
|
-
the connection.
|
|
1190
|
+
**Environment Variables** are used to specify the target local or remote web browser, and the various webdriver capability parameters required
|
|
1191
|
+
to configure the connection.
|
|
1166
1192
|
|
|
1167
1193
|
|
|
1168
1194
|
### Locally hosted desktop web browser
|
|
1169
1195
|
|
|
1170
|
-
For locally hosted desktop web browsers running on macOS
|
|
1196
|
+
For locally hosted desktop web browsers running on macOS or Windows platforms, the `WEB_BROWSER` Environment Variable must be set to one of the
|
|
1171
1197
|
values from the table below:
|
|
1172
1198
|
|
|
1173
1199
|
| `WEB_BROWSER` | **Desktop Platform** |
|
|
1174
1200
|
|--------------------|------------------------------------------------|
|
|
1175
|
-
| `chrome` |
|
|
1176
|
-
| `chrome_headless` |
|
|
1177
|
-
| `firefox` |
|
|
1178
|
-
| `firefox_headless` |
|
|
1179
|
-
| `edge` |
|
|
1180
|
-
| `edge_headless` |
|
|
1181
|
-
| `safari` |
|
|
1201
|
+
| `chrome` | macOS or Windows |
|
|
1202
|
+
| `chrome_headless` | macOS or Windows (headless - no visible UI) |
|
|
1203
|
+
| `firefox` | macOS or Windows |
|
|
1204
|
+
| `firefox_headless` | macOS or Windows (headless - no visible UI) |
|
|
1205
|
+
| `edge` | macOS or Windows |
|
|
1206
|
+
| `edge_headless` | macOS or Windows (headless - no visible UI) |
|
|
1207
|
+
| `safari` | macOS only |
|
|
1182
1208
|
| `ie` | Windows only (IE version 10.x or greater only) |
|
|
1183
1209
|
|
|
1184
1210
|
Refer to **section 8.6 (Using Browser specific Profiles in cucumber.yml)** below.
|
|
@@ -1236,7 +1262,7 @@ A detailed list of file MIME types can be found [here](https://www.freeformatter
|
|
|
1236
1262
|
|
|
1237
1263
|
### Locally hosted emulated mobile web browser
|
|
1238
1264
|
|
|
1239
|
-
You can run your tests against mobile device browsers that are emulated within a locally hosted instance of a Chrome desktop browser on
|
|
1265
|
+
You can run your tests against mobile device browsers that are emulated within a locally hosted instance of a Chrome desktop browser on macOS or
|
|
1240
1266
|
Windows. The specified mobile browser's user agent, CSS screen dimensions, and default screen orientation will be automatically set within the
|
|
1241
1267
|
local Chrome browser instance. You may even specify the emulated device's screen orientation. For locally hosted emulated mobile web browsers,
|
|
1242
1268
|
the `WEB_BROWSER` Environment Variable must be set to one of the values from the table below:
|
|
@@ -1347,7 +1373,7 @@ Refer to **section 8.6 (Using Browser specific Profiles in cucumber.yml)** below
|
|
|
1347
1373
|
#### Mobile Safari browser on iOS Simulators or iOS Physical Devices
|
|
1348
1374
|
|
|
1349
1375
|
You can run your mobile web tests against the mobile Safari browser on simulated iOS devices or physically connected iOS devices using Appium and XCode on
|
|
1350
|
-
|
|
1376
|
+
macOS. You must install Appium, XCode, and the iOS version-specific device simulators for XCode. You must also ensure that the `appium_capybara` gem is
|
|
1351
1377
|
installed and required as described in **section 3.3 (Setup - Using Appium)** above.
|
|
1352
1378
|
|
|
1353
1379
|
Information about Appium setup and configuration requirements for testing on physically connected iOS devices can be found on [this page](https://github.com/appium/appium/blob/master/docs/en/drivers/ios-xcuitest-real-devices.md).
|
|
@@ -1388,7 +1414,7 @@ Refer to **section 8.6 (Using Browser specific Profiles in cucumber.yml)** below
|
|
|
1388
1414
|
|
|
1389
1415
|
#### Mobile Chrome or Android browsers on Android Studio Virtual Device emulators
|
|
1390
1416
|
|
|
1391
|
-
You can run your mobile web tests against the mobile Chrome or Android browser on emulated Android devices using Appium and Android Studio on
|
|
1417
|
+
You can run your mobile web tests against the mobile Chrome or Android browser on emulated Android devices using Appium and Android Studio on macOS. You
|
|
1392
1418
|
must install Android Studio, the desired Android version-specific virtual device emulators, and Appium. Refer to [this page](http://appium.io/docs/en/drivers/android-uiautomator2/index.html)
|
|
1393
1419
|
for information on configuring Appium to work with the Android SDK. You must also ensure that the `appium_capybara` gem is installed and required as
|
|
1394
1420
|
described in **section 3.3 (Setup - Using Appium)** above.
|
|
@@ -1524,6 +1550,7 @@ for information regarding the specific capabilities.
|
|
|
1524
1550
|
| `NETWORK_LOGS` | [Optional] Capture network logs (`true` or `false`) |
|
|
1525
1551
|
| `APPIUM_LOGS` | [Optional] Generate Appium logs (`true` or `false`) |
|
|
1526
1552
|
|
|
1553
|
+
|
|
1527
1554
|
#### Remote desktop browsers on the Sauce Labs service
|
|
1528
1555
|
|
|
1529
1556
|
For remotely hosted desktop web browsers on the Sauce Labs service, the following **Environment Variables** must be set as described in the
|
|
@@ -1543,6 +1570,7 @@ to obtain information regarding the specific capabilities.
|
|
|
1543
1570
|
| `BROWSER_SIZE ` | [Optional] Specify width, height of browser window |
|
|
1544
1571
|
| `RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`) |
|
|
1545
1572
|
|
|
1573
|
+
|
|
1546
1574
|
#### Remote desktop browsers on the TestingBot service
|
|
1547
1575
|
|
|
1548
1576
|
For remotely hosted desktop web browsers on the TestingBot service, the following **Environment Variables** must be set as described in
|
|
@@ -1561,6 +1589,7 @@ regarding the specific capabilities.
|
|
|
1561
1589
|
| `RESOLUTION` | [Optional] Possible values: `800x600`, `1024x768`, `1280x960`, `1280x1024`, `1600x1200`, `1920x1200`, `2560x1440` |
|
|
1562
1590
|
| `BROWSER_SIZE` | [Optional] Specify width, height of browser window |
|
|
1563
1591
|
|
|
1592
|
+
|
|
1564
1593
|
#### Remote desktop browsers on the LambdaTest service
|
|
1565
1594
|
|
|
1566
1595
|
For remotely hosted desktop web browsers on the LambdaTest service, the following **Environment Variables** must be set as described in the table
|
|
@@ -1582,6 +1611,7 @@ to obtain information regarding the specific capabilities.
|
|
|
1582
1611
|
| `ALLOW_COOKIES` | [Optional] Allow all cookies (`true` or `false`) - for Safari browsers only |
|
|
1583
1612
|
| `CONSOLE_LOGS` | [Optional] Used to capture browser console logs. |
|
|
1584
1613
|
|
|
1614
|
+
|
|
1585
1615
|
### Using Browser specific Profiles in cucumber.yml
|
|
1586
1616
|
|
|
1587
1617
|
While you can set **Environment Variables** in the command line when invoking Cucumber, a preferred method of specifying and managing
|
|
@@ -1722,6 +1752,8 @@ that you intend to connect with.
|
|
|
1722
1752
|
|
|
1723
1753
|
#==============
|
|
1724
1754
|
# profiles for remotely hosted web browsers on the BrowserStack service
|
|
1755
|
+
# WARNING: Credentials should not be stored as text in your cucumber.yml file where it can be exposed by anyone with access
|
|
1756
|
+
# to your version control system
|
|
1725
1757
|
#==============
|
|
1726
1758
|
|
|
1727
1759
|
browserstack: WEB_BROWSER=browserstack BS_USERNAME="<INSERT USER NAME HERE>" BS_AUTHKEY="<INSERT PASSWORD HERE>"
|
|
@@ -1752,6 +1784,8 @@ that you intend to connect with.
|
|
|
1752
1784
|
|
|
1753
1785
|
#==============
|
|
1754
1786
|
# profiles for remotely hosted web browsers on the SauceLabs service
|
|
1787
|
+
# WARNING: Credentials should not be stored as text in your cucumber.yml file where it can be exposed by anyone with access
|
|
1788
|
+
# to your version control system
|
|
1755
1789
|
#==============
|
|
1756
1790
|
|
|
1757
1791
|
saucelabs: WEB_BROWSER=saucelabs SL_USERNAME="<INSERT USER NAME HERE>" SL_AUTHKEY="<INSERT PASSWORD HERE>" DATA_CENTER="<INSERT DATA CENTER HERE"
|
|
@@ -1776,6 +1810,8 @@ that you intend to connect with.
|
|
|
1776
1810
|
|
|
1777
1811
|
#==============
|
|
1778
1812
|
# profiles for remotely hosted web browsers on the TestingBot service
|
|
1813
|
+
# WARNING: Credentials should not be stored as text in your cucumber.yml file where it can be exposed by anyone with access
|
|
1814
|
+
# to your version control system
|
|
1779
1815
|
#==============
|
|
1780
1816
|
|
|
1781
1817
|
testingbot: WEB_BROWSER=testingbot TB_USERNAME="<INSERT USER NAME HERE>" TB_AUTHKEY="<INSERT PASSWORD HERE>"
|
|
@@ -1795,6 +1831,8 @@ that you intend to connect with.
|
|
|
1795
1831
|
|
|
1796
1832
|
#==============
|
|
1797
1833
|
# profiles for remotely hosted web browsers on the LambdaTest service
|
|
1834
|
+
# WARNING: Credentials should not be stored as text in your cucumber.yml file where it can be exposed by anyone with access
|
|
1835
|
+
# to your version control system
|
|
1798
1836
|
#==============
|
|
1799
1837
|
|
|
1800
1838
|
lambdatest: WEB_BROWSER=lambdatest LT_USERNAME=<INSERT USER NAME HERE> LT_AUTHKEY=<INSERT PASSWORD HERE>
|
|
@@ -1877,7 +1915,7 @@ area sub-folders as needed. Likewise, `PageSection` class definitions should be
|
|
|
1877
1915
|
|
|
1878
1916
|
## Web Test Automation Framework Implementation
|
|
1879
1917
|
|
|
1880
|
-
<img src="https://i.imgur.com/
|
|
1918
|
+
<img src="https://i.imgur.com/lCT9HbK.jpg" alt="TestCentricity Web Framework Overview" title="TestCentricity Web Framework Overview">
|
|
1881
1919
|
|
|
1882
1920
|
|
|
1883
1921
|
|
|
@@ -9,7 +9,7 @@ module TestCentricity
|
|
|
9
9
|
attr_accessor :locator_type
|
|
10
10
|
|
|
11
11
|
XPATH_SELECTORS = ['//', '[@', '[contains(']
|
|
12
|
-
CSS_SELECTORS = [
|
|
12
|
+
CSS_SELECTORS = %w[# :nth-child( :first-child :last-child :nth-of-type( :first-of-type :last-of-type ^= $= *= :contains(]
|
|
13
13
|
|
|
14
14
|
def set_locator_type(locator = nil)
|
|
15
15
|
locator = @locator if locator.nil?
|
|
@@ -139,6 +139,16 @@ module TestCentricity
|
|
|
139
139
|
ui_object.ready_state
|
|
140
140
|
when :volume
|
|
141
141
|
ui_object.volume
|
|
142
|
+
when :track_count
|
|
143
|
+
ui_object.track_count
|
|
144
|
+
when :active_track
|
|
145
|
+
ui_object.active_track
|
|
146
|
+
when :active_track_data
|
|
147
|
+
ui_object.active_track_data
|
|
148
|
+
when :active_track_source
|
|
149
|
+
ui_object.active_track_source
|
|
150
|
+
when :all_tracks_data
|
|
151
|
+
ui_object.all_tracks_data
|
|
142
152
|
when :crossorigin
|
|
143
153
|
ui_object.crossorigin
|
|
144
154
|
when :preload
|
|
@@ -181,6 +191,8 @@ module TestCentricity
|
|
|
181
191
|
ui_object.aria_describedby
|
|
182
192
|
when :aria_live
|
|
183
193
|
ui_object.aria_live
|
|
194
|
+
when :aria_busy
|
|
195
|
+
ui_object.aria_busy?
|
|
184
196
|
when :aria_selected
|
|
185
197
|
ui_object.aria_selected?
|
|
186
198
|
when :aria_hidden
|
|
@@ -231,6 +243,30 @@ module TestCentricity
|
|
|
231
243
|
ui_object.aria_multiselectable?
|
|
232
244
|
when :content_editable
|
|
233
245
|
ui_object.content_editable?
|
|
246
|
+
when :validation_message
|
|
247
|
+
ui_object.validation_message
|
|
248
|
+
when :badInput
|
|
249
|
+
ui_object.validity?(:badInput)
|
|
250
|
+
when :customError
|
|
251
|
+
ui_object.validity?(:customError)
|
|
252
|
+
when :patternMismatch
|
|
253
|
+
ui_object.validity?(:patternMismatch)
|
|
254
|
+
when :rangeOverflow
|
|
255
|
+
ui_object.validity?(:rangeOverflow)
|
|
256
|
+
when :rangeUnderflow
|
|
257
|
+
ui_object.validity?(:rangeUnderflow)
|
|
258
|
+
when :stepMismatch
|
|
259
|
+
ui_object.validity?(:stepMismatch)
|
|
260
|
+
when :tooLong
|
|
261
|
+
ui_object.validity?(:tooLong)
|
|
262
|
+
when :tooShort
|
|
263
|
+
ui_object.validity?(:tooShort)
|
|
264
|
+
when :typeMismatch
|
|
265
|
+
ui_object.validity?(:typeMismatch)
|
|
266
|
+
when :valid
|
|
267
|
+
ui_object.validity?(:valid)
|
|
268
|
+
when :valueMissing
|
|
269
|
+
ui_object.validity?(:valueMissing)
|
|
234
270
|
else
|
|
235
271
|
if property.is_a?(Hash)
|
|
236
272
|
property.map do |key, value|
|
|
@@ -356,5 +392,6 @@ module TestCentricity
|
|
|
356
392
|
raise "Expected element '#{expected_element.get_name}' to have focus but found '#{focused_obj[:id]} is focused instead'" unless focused_obj == expected_obj.native
|
|
357
393
|
|
|
358
394
|
puts "Element '#{expected_element.get_name}' is focused as expected"
|
|
359
|
-
|
|
395
|
+
end
|
|
396
|
+
end
|
|
360
397
|
end
|