testcentricity_web 4.1.10 → 4.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +92 -1
- data/README.md +301 -230
- data/lib/testcentricity_web/browser_helper.rb +2 -1
- data/lib/testcentricity_web/data_objects/environment.rb +0 -3
- 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 +162 -152
- 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 +18 -162
- 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
data/README.md
CHANGED
@@ -1,18 +1,21 @@
|
|
1
1
|
# TestCentricity™ Web
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/testcentricity_web.svg)](https://badge.fury.io/rb/testcentricity_web) [![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause)
|
4
|
+
![Gem Downloads](https://img.shields.io/gem/dt/testcentricity_web) ![Maintained](https://img.shields.io/maintenance/yes/2022)
|
4
5
|
|
5
6
|
|
6
|
-
The TestCentricity™ Web core
|
7
|
-
for use with Cucumber, Capybara (version 3.
|
8
|
-
Selenium-Webdriver capabilities required to establish a connection with a
|
7
|
+
The TestCentricity™ Web core framework for desktop and mobile web browser-based app testing implements a Page Object Model
|
8
|
+
DSL for use with Cucumber (version 7.x or greater), Capybara (version 3.37), and Selenium-Webdriver (version 4.3). It also
|
9
|
+
facilitates the configuration of the appropriate Selenium-Webdriver capabilities required to establish a connection with a
|
10
|
+
local or cloud hosted desktop or mobile web browser.
|
9
11
|
|
10
12
|
The TestCentricity™ Web gem supports running automated tests against the following web test targets:
|
11
13
|
* locally hosted desktop browsers (Chrome, Edge, Firefox, Safari, or IE)
|
12
14
|
* locally hosted "headless" Chrome, Firefox, or Edge browsers
|
15
|
+
*
|
13
16
|
* 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
|
17
|
+
* mobile Safari browsers on iOS device simulators or physical iOS devices (using Appium and XCode on macOS)
|
18
|
+
* mobile Chrome or Android browsers on Android Studio virtual device emulators (using Appium and Android Studio on macOS)
|
16
19
|
* cloud hosted desktop (Firefox, Chrome, Safari, IE, or Edge) or mobile (iOS Mobile Safari or Android) web browsers using the following service:
|
17
20
|
* [Browserstack](https://www.browserstack.com/list-of-browsers-and-platforms?product=automate)
|
18
21
|
* [Sauce Labs](https://saucelabs.com/open-source#automated-testing-platform)
|
@@ -29,13 +32,14 @@ A complete history of bug fixes and new features can be found in the {file:CHANG
|
|
29
32
|
|
30
33
|
The RubyDocs for this gem can be found [here](https://www.rubydoc.info/gems/testcentricity_web).
|
31
34
|
|
32
|
-
An example project that demonstrates the implementation of a page object model framework using Cucumber and TestCentricity™
|
35
|
+
An example project that demonstrates the implementation of a page object model framework using Cucumber and TestCentricity™ Web
|
33
36
|
can be found [here](https://github.com/TestCentricity/tc_web_sample).
|
34
37
|
|
35
38
|
|
36
39
|
## Installation
|
37
40
|
|
38
|
-
TestCentricity version 4.1 and above requires Ruby 2.7 or later. To install the TestCentricity gem, add this line
|
41
|
+
TestCentricity Web version 4.1 and above requires Ruby 2.7.5 or later. To install the TestCentricity Web gem, add this line
|
42
|
+
to your automation project's Gemfile:
|
39
43
|
|
40
44
|
gem 'testcentricity_web'
|
41
45
|
|
@@ -59,7 +63,7 @@ If you are using Cucumber, you need to require the following in your `env.rb` fi
|
|
59
63
|
|
60
64
|
### Using RSpec
|
61
65
|
|
62
|
-
If you are using RSpec instead, you need to require the following in your `
|
66
|
+
If you are using RSpec instead, you need to require the following in your `spec_helper.rb` file:
|
63
67
|
|
64
68
|
require 'capybara'
|
65
69
|
require 'capybara/rspec'
|
@@ -68,8 +72,8 @@ If you are using RSpec instead, you need to require the following in your `env.r
|
|
68
72
|
|
69
73
|
### Using Appium
|
70
74
|
|
71
|
-
If you will be running your tests on mobile Safari browsers on simulated iOS devices using Appium and XCode Simulators, you
|
72
|
-
the following in your `env.rb` file:
|
75
|
+
If you will be running your tests on mobile Safari browsers on simulated iOS devices using Appium and XCode Simulators, you
|
76
|
+
need to require the following in your `env.rb` and/or `spec_helper.rb` file:
|
73
77
|
|
74
78
|
require 'appium_capybara'
|
75
79
|
|
@@ -84,21 +88,23 @@ And then execute:
|
|
84
88
|
|
85
89
|
## PageObjects
|
86
90
|
|
87
|
-
The **Page Object Model** is a test automation pattern that aims to create an abstraction of your web app's User Interface
|
88
|
-
in tests. A **Page Object**
|
89
|
-
implementation details of a web page and expose an API that supports interaction with, and validation of
|
91
|
+
The **Page Object Model** is a test automation pattern that aims to create an abstraction of your web app's User Interface
|
92
|
+
that can be used in tests. A **Page Object** represents a single page in your AUT (Application Under Test). **Page Objects**
|
93
|
+
encapsulate the implementation details of a web page and expose an API that supports interaction with, and validation of
|
94
|
+
the UI elements on the page.
|
90
95
|
|
91
|
-
**Page Objects** makes it easier to maintain automated tests because changes to page UI elements are updated in only one
|
92
|
-
**Page Object** class definition. By adopting a **Page Object Model**, Cucumber Feature files and step
|
93
|
-
hold specific information about a page's UI objects, thus minimizing maintenance
|
94
|
-
(URL path, text field attributes, button captions, etc.),
|
95
|
-
no need to update the affected feature
|
96
|
+
**Page Objects** makes it easier to maintain automated tests because changes to page UI elements are updated in only one
|
97
|
+
location - in the **Page Object** class definition. By adopting a **Page Object Model**, Cucumber Feature files and step
|
98
|
+
definitions are no longer required to hold specific information about a page's UI objects, thus minimizing maintenance
|
99
|
+
requirements. If any element on, or property of a page changes (URL path, text field attributes, button captions, etc.),
|
100
|
+
maintenance is performed in the `PageObject` class definition only, typically with no need to update the affected feature
|
101
|
+
file, scenarios, or step definitions.
|
96
102
|
|
97
103
|
|
98
104
|
### Defining a PageObject
|
99
105
|
|
100
|
-
Your `PageObject` class definitions should be contained within individual `.rb` files in the `features/support/pages` folder
|
101
|
-
test automation project. You define new `PageObjects` as shown below:
|
106
|
+
Your `PageObject` class definitions should be contained within individual `.rb` files in the `features/support/pages` folder
|
107
|
+
of your test automation project. You define new `PageObjects` as shown below:
|
102
108
|
|
103
109
|
class LoginPage < TestCentricity::PageObject
|
104
110
|
end
|
@@ -114,25 +120,25 @@ test automation project. You define new `PageObjects` as shown below:
|
|
114
120
|
|
115
121
|
### Adding Traits to your PageObject
|
116
122
|
|
117
|
-
Web pages typically have names and URLs associated with them. Web pages also typically have a unique object or attribute
|
118
|
-
indicates that the page's contents have fully loaded.
|
123
|
+
Web pages typically have names and URLs associated with them. Web pages also typically have a unique object or attribute
|
124
|
+
that, when present, indicates that the page's contents have fully loaded.
|
119
125
|
|
120
|
-
The `page_name` trait is registered with the `PageManager` object, which includes a `find_page` method that takes a page
|
121
|
-
parameter and returns an instance of the associated `
|
122
|
-
trait for each `PageObject` to be registered.
|
126
|
+
The `page_name` trait is registered with the `PageManager` object, which includes a `find_page` method that takes a page
|
127
|
+
name as a parameter and returns an instance of the associated `PageObject`. If you intend to use the `PageManager`, you
|
128
|
+
must define a `page_name` trait for each `PageObject` to be registered.
|
123
129
|
|
124
|
-
The `page_name` trait is usually a `String` value that represents the name of the page that will be matched by the `PageManager.findpage`
|
125
|
-
`page_name` traits are case and white-space sensitive. For pages that may be referenced with multiple names, the
|
126
|
-
an `Array` of `String` values representing those page names.
|
130
|
+
The `page_name` trait is usually a `String` value that represents the name of the page that will be matched by the `PageManager.findpage`
|
131
|
+
method. `page_name` traits are case and white-space sensitive. For pages that may be referenced with multiple names, the
|
132
|
+
`page_name` trait may also be an `Array` of `String` values representing those page names.
|
127
133
|
|
128
|
-
A `
|
129
|
-
|
130
|
-
|
131
|
-
via a URL.
|
134
|
+
A `page_locator` trait is defined if a page has a unique object or attribute that exists once the page's contents have fully
|
135
|
+
loaded. The `page_locator` trait is a CSS or Xpath expression that uniquely identifies the object or attribute. The
|
136
|
+
`verify_page_exists` method waits for the `page_locator` trait to exist.
|
132
137
|
|
133
|
-
A `
|
134
|
-
|
135
|
-
|
138
|
+
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
|
139
|
+
specify a base URL when calling the `WebDriverConnect.initialize_web_driver` method, then your `page_url` trait can be the
|
140
|
+
relative URL slug that will be appended to the base URL specified in `app_host`. Specifying a `page_url` trait is optional,
|
141
|
+
as not all web pages can be directly loaded via a URL.
|
136
142
|
|
137
143
|
You define your page's **Traits** as shown below:
|
138
144
|
|
@@ -202,9 +208,9 @@ Web pages are made up of UI elements like text fields, check boxes, combo boxes,
|
|
202
208
|
|
203
209
|
### Adding Methods to your PageObject
|
204
210
|
|
205
|
-
It is good practice for your Cucumber step definitions to call high level methods in your your `PageObject` instead of
|
206
|
-
and interacting with a page object's UI elements. You can add high level methods to your `PageObject`
|
207
|
-
the UI to hide implementation details, as shown below:
|
211
|
+
It is good practice for your Cucumber step definitions to call high level methods in your your `PageObject` instead of
|
212
|
+
directly accessing and interacting with a page object's UI elements. You can add high level methods to your `PageObject`
|
213
|
+
class definition for interacting with the UI to hide implementation details, as shown below:
|
208
214
|
|
209
215
|
class LoginPage < TestCentricity::PageObject
|
210
216
|
trait(:page_name) { 'Login' }
|
@@ -301,9 +307,10 @@ Once your `PageObjects` have been instantiated, you can call your methods as sho
|
|
301
307
|
|
302
308
|
## PageSections
|
303
309
|
|
304
|
-
A `PageSection` is a collection of **UI Elements** that may appear in multiple locations on a page, or on multiple pages
|
305
|
-
app. It is a collection of **UI Elements** that represent a conceptual area of functionality, like a navigation
|
306
|
-
or a menu. **UI Elements** and functional behavior are confined to the scope of a `PageSection`
|
310
|
+
A `PageSection` is a collection of **UI Elements** that may appear in multiple locations on a page, or on multiple pages
|
311
|
+
in a web app. It is a collection of **UI Elements** that represent a conceptual area of functionality, like a navigation
|
312
|
+
bar, a search capability, or a menu. **UI Elements** and functional behavior are confined to the scope of a `PageSection`
|
313
|
+
object.
|
307
314
|
|
308
315
|
<img src="https://i.imgur.com/BTgi59R.jpg" alt="Navigation Header" title="Navigation Header">
|
309
316
|
|
@@ -317,8 +324,8 @@ A `PageSection` may contain other `PageSection` objects.
|
|
317
324
|
|
318
325
|
### Defining a PageSection
|
319
326
|
|
320
|
-
Your `PageSection` class definitions should be contained within individual `.rb` files in the `features/support/sections`
|
321
|
-
your test automation project. You define new `PageSection` as shown below:
|
327
|
+
Your `PageSection` class definitions should be contained within individual `.rb` files in the `features/support/sections`
|
328
|
+
folder of your test automation project. You define new `PageSection` as shown below:
|
322
329
|
|
323
330
|
class SearchForm < TestCentricity::PageSection
|
324
331
|
end
|
@@ -339,8 +346,8 @@ You define your section's **Traits** as shown below:
|
|
339
346
|
|
340
347
|
### Adding UI Elements to your PageSection
|
341
348
|
|
342
|
-
`PageSections` are typically made up of UI elements like text fields, check boxes, combo boxes, radio buttons, tables, lists,
|
343
|
-
**UI Elements** are added to your `PageSection` class definition as shown below:
|
349
|
+
`PageSections` are typically made up of UI elements like text fields, check boxes, combo boxes, radio buttons, tables, lists,
|
350
|
+
buttons, etc. **UI Elements** are added to your `PageSection` class definition as shown below:
|
344
351
|
|
345
352
|
class SearchForm < TestCentricity::PageSection
|
346
353
|
trait(:section_locator) { 'form#gnav-search' }
|
@@ -387,28 +394,27 @@ You add a `PageSection` to its associated `PageObject` as shown below:
|
|
387
394
|
Once your `PageObject` has been instantiated, you can call its `PageSection` methods as shown below:
|
388
395
|
|
389
396
|
home_page.search_form.search_for('ocarina')
|
390
|
-
|
391
|
-
|
397
|
+
|
392
398
|
|
393
399
|
## UIElements
|
394
400
|
|
395
|
-
`PageObjects` and `PageSections` are typically made up of **UI Element** like text fields, check boxes, select lists (combo
|
396
|
-
radio buttons, tables, ordered and unordered lists, buttons, images, HTML5 video objects, HTML5 audio objects, etc.
|
397
|
-
and instantiated within the class definition of the `PageObject` or `PageSection` in which they
|
398
|
-
all UI elements are based on the `UIElement` class.
|
401
|
+
`PageObjects` and `PageSections` are typically made up of **UI Element** like text fields, check boxes, select lists (combo
|
402
|
+
boxes), radio buttons, tables, ordered and unordered lists, buttons, images, HTML5 video objects, HTML5 audio objects, etc.
|
403
|
+
**UI Elements** are declared and instantiated within the class definition of the `PageObject` or `PageSection` in which they
|
404
|
+
are contained. With TestCentricity Web, all UI elements are based on the `UIElement` class.
|
399
405
|
|
400
406
|
|
401
407
|
### Declaring and Instantiating UIElements
|
402
408
|
|
403
409
|
Single `UIElement` declarations have the following format:
|
404
410
|
|
405
|
-
elementType :
|
411
|
+
elementType :elementName, locator
|
406
412
|
|
407
|
-
* The `
|
413
|
+
* The `elementName` is the unique name that you will use to refer to the UI element and is specified as a `Symbol`.
|
408
414
|
* The `locator` is the CSS or XPath attribute that uniquely and unambiguously identifies the `UIElement`.
|
409
415
|
|
410
|
-
Multiple `UIElement` declarations for a collection of elements of the same type can be performed by passing a hash table
|
411
|
-
names and locators of each individual element.
|
416
|
+
Multiple `UIElement` declarations for a collection of elements of the same type can be performed by passing a hash table
|
417
|
+
containing the names and locators of each individual element.
|
412
418
|
|
413
419
|
### Example UIElement Declarations
|
414
420
|
|
@@ -474,9 +480,10 @@ Supported `UIElement` elementTypes and their declarations have the following for
|
|
474
480
|
end
|
475
481
|
|
476
482
|
|
477
|
-
Refer to the Class List documentation for the `PageObject` and `PageSection` classes for details on the class methods used
|
478
|
-
and instantiating `UIElements`. Examples of UI element declarations can be found in the ***Adding UI Elements
|
479
|
-
|
483
|
+
Refer to the Class List documentation for the `PageObject` and `PageSection` classes for details on the class methods used
|
484
|
+
for declaring and instantiating `UIElements`. Examples of UI element declarations can be found in the ***Adding UI Elements
|
485
|
+
to your PageObject*** and
|
486
|
+
***Adding UI Elements to your PageSection*** sections above.
|
480
487
|
|
481
488
|
|
482
489
|
### UIElement Inherited Methods
|
@@ -526,8 +533,10 @@ With TestCentricity, all UI elements are based on the `UIElement` class, and inh
|
|
526
533
|
element.wait_until_gone(seconds)
|
527
534
|
element.wait_until_visible(seconds)
|
528
535
|
element.wait_until_hidden(seconds)
|
536
|
+
element.wait_until_enabled(seconds)
|
529
537
|
element.wait_until_value_is(value, seconds)
|
530
538
|
element.wait_until_value_changes(seconds)
|
539
|
+
element.wait_while_busy(seconds)
|
531
540
|
|
532
541
|
**WAI-ARIA Object Accessibility (A11y) methods:**
|
533
542
|
|
@@ -567,24 +576,26 @@ With TestCentricity, all UI elements are based on the `UIElement` class, and inh
|
|
567
576
|
|
568
577
|
### Populating your PageObject or PageSection with data
|
569
578
|
|
570
|
-
A typical automated test may be required to perform the entry of test data by interacting with various `UIElements` on your
|
571
|
-
`PageSection`. This data entry can be performed using the various object action methods (listed above) for
|
572
|
-
interacted with.
|
579
|
+
A typical automated test may be required to perform the entry of test data by interacting with various `UIElements` on your
|
580
|
+
`PageObject` or `PageSection`. This data entry can be performed using the various object action methods (listed above) for
|
581
|
+
each `UIElement` that needs to be interacted with.
|
573
582
|
|
574
|
-
The `PageObject.populate_data_fields` and `PageSection.populate_data_fields` methods support the entry of test data into a
|
575
|
-
`UIElements`. The `populate_data_fields` method accepts a hash containing key/hash pairs of `UIElements` and
|
576
|
-
entered. Data values must be in the form of a `String` for `textfield`, `selectlist`, and `filefield`
|
577
|
-
controls, data must either be a `Boolean` or a `String` that evaluates to a `Boolean`
|
578
|
-
data must be an `Integer`. For `input(type='color')` color picker
|
579
|
-
|
583
|
+
The `PageObject.populate_data_fields` and `PageSection.populate_data_fields` methods support the entry of test data into a
|
584
|
+
collection of `UIElements`. The `populate_data_fields` method accepts a hash containing key/hash pairs of `UIElements` and
|
585
|
+
their associated data to be entered. Data values must be in the form of a `String` for `textfield`, `selectlist`, and `filefield`
|
586
|
+
controls. For `checkbox` and `radio` controls, data must either be a `Boolean` or a `String` that evaluates to a `Boolean`
|
587
|
+
value (Yes, No, 1, 0, true, false). For `range` controls, data must be an `Integer`. For `input(type='color')` color picker
|
588
|
+
controls, which are specified as a `textfield`, data must be in the form of a hex color `String`. For `section` objects, data
|
589
|
+
values must be a `String`, and the `section` object must have a `set` method defined.
|
580
590
|
|
581
|
-
The `populate_data_fields` method verifies that data attributes associated with each `UIElement` is not `nil` or `empty`
|
582
|
-
enter data into the `UIElement`.
|
591
|
+
The `populate_data_fields` method verifies that data attributes associated with each `UIElement` is not `nil` or `empty`
|
592
|
+
before attempting to enter data into the `UIElement`.
|
583
593
|
|
584
|
-
The optional `wait_time` parameter is used to specify the time (in seconds) to wait for each `UIElement` to become
|
585
|
-
(the `UIElement` must be visible and enabled) before entering the associated data value. This option is useful
|
586
|
-
or setting the state of a `UIElement` might cause other `UIElements` to become visible
|
587
|
-
subsequent `UIElements` will be ready to be interacted with as
|
594
|
+
The optional `wait_time` parameter is used to specify the time (in seconds) to wait for each `UIElement` to become viable
|
595
|
+
for data entry (the `UIElement` must be visible and enabled) before entering the associated data value. This option is useful
|
596
|
+
in situations where entering data, or setting the state of a `UIElement` might cause other `UIElements` to become visible
|
597
|
+
or active. Specifying a wait_time value ensures that the subsequent `UIElements` will be ready to be interacted with as
|
598
|
+
states are changed. If the wait time is `nil`, then the wait time will be 5 seconds.
|
588
599
|
|
589
600
|
def enter_data(user_data)
|
590
601
|
fields = {
|
@@ -602,14 +613,14 @@ subsequent `UIElements` will be ready to be interacted with as states are change
|
|
602
613
|
|
603
614
|
### Verifying UIElements on your PageObject or PageSection
|
604
615
|
|
605
|
-
A typical automated test executes one or more interactions with the user interface, and then performs a validation to verify
|
606
|
-
the expected state of the UI has been achieved. This verification can be performed using the various object state
|
607
|
-
for each `UIElement` that requires verification. Depending on the complexity and number of `UIElements`
|
608
|
-
verify the presence of `UIElements` and their correct states can become cumbersome.
|
616
|
+
A typical automated test executes one or more interactions with the user interface, and then performs a validation to verify
|
617
|
+
whether the expected state of the UI has been achieved. This verification can be performed using the various object state
|
618
|
+
methods (listed above) for each `UIElement` that requires verification. Depending on the complexity and number of `UIElements`
|
619
|
+
to be verified, the code required to verify the presence of `UIElements` and their correct states can become cumbersome.
|
609
620
|
|
610
|
-
The `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods support the verification of multiple properties
|
611
|
-
UI elements on a `PageObject` or `PageSection`. The `verify_ui_states` method accepts a hash containing key/hash
|
612
|
-
elements and their properties or attributes to be verified.
|
621
|
+
The `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods support the verification of multiple properties
|
622
|
+
of multiple UI elements on a `PageObject` or `PageSection`. The `verify_ui_states` method accepts a hash containing key/hash
|
623
|
+
pairs of UI elements and their properties or attributes to be verified.
|
613
624
|
|
614
625
|
ui = {
|
615
626
|
object1 => { property: state },
|
@@ -618,9 +629,9 @@ elements and their properties or attributes to be verified.
|
|
618
629
|
}
|
619
630
|
verify_ui_states(ui)
|
620
631
|
|
621
|
-
The `verify_ui_states` method queues up any exceptions that occur while verifying each object's properties until all `UIElements`
|
622
|
-
properties have been checked, and then posts any exceptions encountered upon completion. Posted exceptions include
|
623
|
-
dashed highlight around the UI element that did not match the expected results.
|
632
|
+
The `verify_ui_states` method queues up any exceptions that occur while verifying each object's properties until all `UIElements`
|
633
|
+
and their properties have been checked, and then posts any exceptions encountered upon completion. Posted exceptions include
|
634
|
+
a screenshot with a red dashed highlight around the UI element that did not match the expected results.
|
624
635
|
|
625
636
|
The `verify_ui_states` method supports the following property/state pairs:
|
626
637
|
|
@@ -659,6 +670,21 @@ The `verify_ui_states` method supports the following property/state pairs:
|
|
659
670
|
:max Integer
|
660
671
|
:step Integer
|
661
672
|
|
673
|
+
Text Field Constraint validation
|
674
|
+
|
675
|
+
:validation_message String
|
676
|
+
:badInput Boolean
|
677
|
+
:customError Boolean
|
678
|
+
:patternMismatch Boolean
|
679
|
+
:rangeOverflow Boolean
|
680
|
+
:rangeUnderflow Boolean
|
681
|
+
:stepMismatch Boolean
|
682
|
+
:tooLong Boolean
|
683
|
+
:tooShort Boolean
|
684
|
+
:typeMismatch Boolean
|
685
|
+
:valid Boolean
|
686
|
+
:valueMissing Boolean
|
687
|
+
|
662
688
|
**Checkboxes:**
|
663
689
|
|
664
690
|
:checked Boolean
|
@@ -722,6 +748,13 @@ The `verify_ui_states` method supports the following property/state pairs:
|
|
722
748
|
:volume Float
|
723
749
|
:preload String
|
724
750
|
:poster String
|
751
|
+
:track_count Integer
|
752
|
+
:active_track Integer
|
753
|
+
:active_track_data Hash
|
754
|
+
:all_tracks_data Array of Hash
|
755
|
+
:track_data Hash
|
756
|
+
:active_track_source String
|
757
|
+
:track_source String
|
725
758
|
|
726
759
|
#### ARIA accessibility property/state pairs
|
727
760
|
|
@@ -740,6 +773,7 @@ The `verify_ui_states` method supports the following ARIA accessibility property
|
|
740
773
|
:aria_checked Boolean
|
741
774
|
:aria_readonly Boolean
|
742
775
|
:aria_pressed Boolean
|
776
|
+
:aria_busy Boolean
|
743
777
|
:aria_haspopup Boolean
|
744
778
|
:aria_sort String
|
745
779
|
:aria_rowcount String
|
@@ -867,18 +901,18 @@ Baseline translation strings are stored in `.yml` files in the `config/locales/`
|
|
867
901
|
|
868
902
|
### Working with custom UIElements
|
869
903
|
|
870
|
-
Many responsive and touch-enabled web based user interfaces are implemented using front-end JavaScript libraries for building
|
871
|
-
interfaces based on UI components. Popular JS libraries include React, Angular, and Ember.js. These stylized and adorned
|
872
|
-
present a challenge when attempting to interact with them using Capybara and Selenium based automated tests.
|
904
|
+
Many responsive and touch-enabled web based user interfaces are implemented using front-end JavaScript libraries for building
|
905
|
+
user interfaces based on UI components. Popular JS libraries include React, Angular, and Ember.js. These stylized and adorned
|
906
|
+
controls can present a challenge when attempting to interact with them using Capybara and Selenium based automated tests.
|
873
907
|
|
874
908
|
#### Radio and Checkbox UIElements
|
875
909
|
|
876
|
-
Sometimes, radio buttons and checkboxes implemented using JS component libraries cannot be interacted with due to other UI
|
877
|
-
being overlaid on top of them and the base `input(type='radio')` or `input(type='checkbox')` element not being visible.
|
910
|
+
Sometimes, radio buttons and checkboxes implemented using JS component libraries cannot be interacted with due to other UI
|
911
|
+
elements being overlaid on top of them and the base `input(type='radio')` or `input(type='checkbox')` element not being visible.
|
878
912
|
|
879
|
-
In the screenshots below of an airline flight search and booking page, the **Roundtrip** and **One-way** radio buttons are
|
880
|
-
`label` elements that also acts as proxies for their associated `input(type='radio')` elements, and they intercept
|
881
|
-
that would normally be handled by the `input(type='radio')` elements.
|
913
|
+
In the screenshots below of an airline flight search and booking page, the **Roundtrip** and **One-way** radio buttons are
|
914
|
+
adorned by `label` elements that also acts as proxies for their associated `input(type='radio')` elements, and they intercept
|
915
|
+
the `click` actions that would normally be handled by the `input(type='radio')` elements.
|
882
916
|
|
883
917
|
<img src="https://i.imgur.com/7bW5u4c.jpg" alt="Roundtrip Radio button Input" title="Roundtrip Radio button Input">
|
884
918
|
|
@@ -977,19 +1011,19 @@ as element locators.
|
|
977
1011
|
#### List UIElements
|
978
1012
|
|
979
1013
|
The basic HTML list is typically composed of the parent `ul` object, and one or more `li` elements representing the items
|
980
|
-
in the list. However, list controls implemented using JS component libraries can be composed of multiple elements representing
|
981
|
-
components of a list implementation.
|
1014
|
+
in the list. However, list controls implemented using JS component libraries can be composed of multiple elements representing
|
1015
|
+
the components of a list implementation.
|
982
1016
|
|
983
|
-
The `List.define_list_elements` method provides a means of specifying the elements that make up the key components of a `list`
|
984
|
-
The method accepts a hash of element designators (key) and a CSS or Xpath expression (value) that expression that
|
985
|
-
the element. Valid element designators are `list_item:`and `selected_item:`.
|
1017
|
+
The `List.define_list_elements` method provides a means of specifying the elements that make up the key components of a `list`
|
1018
|
+
control. The method accepts a hash of element designators (key) and a CSS or Xpath expression (value) that expression that
|
1019
|
+
uniquely identifies the element. Valid element designators are `list_item:`and `selected_item:`.
|
986
1020
|
|
987
1021
|
|
988
1022
|
## Instantiating your PageObjects
|
989
1023
|
|
990
1024
|
Before you can call the methods in your `PageObjects` and `PageSections`, you must instantiate the `PageObjects` of your web
|
991
|
-
application, as well as create instance variables which can be used when calling a `PageObject`'s methods from your step
|
992
|
-
There are several ways to instantiate your `PageObjects`.
|
1025
|
+
application, as well as create instance variables which can be used when calling a `PageObject`'s methods from your step
|
1026
|
+
definitions. There are several ways to instantiate your `PageObjects`.
|
993
1027
|
|
994
1028
|
One common implementation is shown below:
|
995
1029
|
|
@@ -1013,17 +1047,17 @@ One common implementation is shown below:
|
|
1013
1047
|
|
1014
1048
|
World(WorldPages)
|
1015
1049
|
|
1016
|
-
The `WorldPages` module above can be defined in your `env.rb` file, or you can define it in a separate `world_pages.rb` file
|
1017
|
-
`features/support` folder.
|
1050
|
+
The `WorldPages` module above can be defined in your `env.rb` file, or you can define it in a separate `world_pages.rb` file
|
1051
|
+
in the `features/support` folder.
|
1018
1052
|
|
1019
|
-
While this approach is effective for small web applications with only a few pages (and hence few `PageObjects`), it quickly
|
1020
|
-
cumbersome to manage if your web application has dozens of `PageObjects` that need to be instantiated and managed.
|
1053
|
+
While this approach is effective for small web applications with only a few pages (and hence few `PageObjects`), it quickly
|
1054
|
+
becomes cumbersome to manage if your web application has dozens of `PageObjects` that need to be instantiated and managed.
|
1021
1055
|
|
1022
1056
|
### Using the PageManager
|
1023
1057
|
|
1024
|
-
The `PageManager` class provides methods for supporting the instantiation and management of `PageObjects`. In the code example
|
1025
|
-
the `page_objects` method contains a hash table of your `PageObject` instances and their associated `PageObject`
|
1026
|
-
instantiated by `PageManager`:
|
1058
|
+
The `PageManager` class provides methods for supporting the instantiation and management of `PageObjects`. In the code example
|
1059
|
+
below, the `page_objects` method contains a hash table of your `PageObject` instances and their associated `PageObject` classes
|
1060
|
+
to be instantiated by `PageManager`:
|
1027
1061
|
|
1028
1062
|
module WorldPages
|
1029
1063
|
def page_objects
|
@@ -1053,8 +1087,8 @@ instantiated by `PageManager`:
|
|
1053
1087
|
|
1054
1088
|
The `WorldPages` module above should be defined in the `world_pages.rb` file in the `features/support` folder.
|
1055
1089
|
|
1056
|
-
Include the code below in your `env.rb` file to ensure that your `PageObjects` are instantiated before your Cucumber scenarios
|
1057
|
-
executed:
|
1090
|
+
Include the code below in your `env.rb` file to ensure that your `PageObjects` are instantiated before your Cucumber scenarios
|
1091
|
+
are executed:
|
1058
1092
|
|
1059
1093
|
include WorldPages
|
1060
1094
|
WorldPages.instantiate_page_objects
|
@@ -1064,8 +1098,8 @@ executed:
|
|
1064
1098
|
|
1065
1099
|
### Leveraging the PageManager in your Cucumber tests
|
1066
1100
|
|
1067
|
-
Many Cucumber based automated tests suites include scenarios that verify that web pages are correctly loaded, displayed, or
|
1068
|
-
navigated to by clicking associated links. One such Cucumber navigation scenario is displayed below:
|
1101
|
+
Many Cucumber based automated tests suites include scenarios that verify that web pages are correctly loaded, displayed, or
|
1102
|
+
can be navigated to by clicking associated links. One such Cucumber navigation scenario is displayed below:
|
1069
1103
|
|
1070
1104
|
Scenario Outline: Verify Home page navigation links
|
1071
1105
|
Given I am on the Home page
|
@@ -1081,8 +1115,8 @@ navigated to by clicking associated links. One such Cucumber navigation scenario
|
|
1081
1115
|
|FAQs |
|
1082
1116
|
|Contact Us |
|
1083
1117
|
|
1084
|
-
In the above example, the step definitions associated with the 3 steps might be implemented using a `page_dispatcher` method
|
1085
|
-
`case` statement to parse the `page` parameter as in the example below:
|
1118
|
+
In the above example, the step definitions associated with the 3 steps might be implemented using a `page_dispatcher` method
|
1119
|
+
using a `case` statement to parse the `page` parameter as in the example below:
|
1086
1120
|
|
1087
1121
|
Given(/^I am on the (.*) page$/) do |page_name|
|
1088
1122
|
target_page = page_dispatcher(page_name)
|
@@ -1121,14 +1155,15 @@ In the above example, the step definitions associated with the 3 steps might be
|
|
1121
1155
|
end
|
1122
1156
|
|
1123
1157
|
|
1124
|
-
While this approach may be effective for small web applications with only a few pages (and hence few `PageObjects`), it quickly
|
1125
|
-
cumbersome to manage if your web application has dozens of `PageObjects` that need to be managed.
|
1158
|
+
While this approach may be effective for small web applications with only a few pages (and hence few `PageObjects`), it quickly
|
1159
|
+
becomes cumbersome to manage if your web application has dozens of `PageObjects` that need to be managed.
|
1126
1160
|
|
1127
|
-
The `PageManager` class provides a `find_page` method that replaces the cumbersome and difficult to maintain `case` statement
|
1128
|
-
above example. The `PageManager.current_page` method allows you to set or get an instance of the currently active
|
1161
|
+
The `PageManager` class provides a `find_page` method that replaces the cumbersome and difficult to maintain `case` statement
|
1162
|
+
used in the above example. The `PageManager.current_page` method allows you to set or get an instance of the currently active
|
1163
|
+
Page Object.
|
1129
1164
|
|
1130
|
-
To use these `PageManager` methods, include the step definitions and code below in a `page_steps.rb` or `generic_steps.rb` file
|
1131
|
-
`features/step_definitions` folder:
|
1165
|
+
To use these `PageManager` methods, include the step definitions and code below in a `page_steps.rb` or `generic_steps.rb` file
|
1166
|
+
in the `features/step_definitions` folder:
|
1132
1167
|
|
1133
1168
|
include TestCentricity
|
1134
1169
|
|
@@ -1157,28 +1192,29 @@ To use these `PageManager` methods, include the step definitions and code below
|
|
1157
1192
|
|
1158
1193
|
## Connecting to a Web Browser
|
1159
1194
|
|
1160
|
-
The `TestCentricity::WebDriverConnect.initialize_web_driver` method configures the appropriate Selenium-Webdriver capabilities
|
1161
|
-
establish a connection with a target web browser, and sets the base host URL of the web site you are running your
|
1195
|
+
The `TestCentricity::WebDriverConnect.initialize_web_driver` method configures the appropriate Selenium-Webdriver capabilities
|
1196
|
+
required to establish a connection with a target web browser, and sets the base host URL of the web site you are running your
|
1197
|
+
tests against.
|
1162
1198
|
|
1163
|
-
The `TestCentricity::WebDriverConnect.initialize_web_driver` method accepts a single optional parameter - the base host URL.
|
1164
|
-
**Environment Variables** are used to specify the target local or remote web browser, and the various webdriver
|
1165
|
-
the connection.
|
1199
|
+
The `TestCentricity::WebDriverConnect.initialize_web_driver` method accepts a single optional parameter - the base host URL.
|
1200
|
+
Cucumber **Environment Variables** are used to specify the target local or remote web browser, and the various webdriver
|
1201
|
+
capability parameters required to configure the connection.
|
1166
1202
|
|
1167
1203
|
|
1168
1204
|
### Locally hosted desktop web browser
|
1169
1205
|
|
1170
|
-
For locally hosted desktop web browsers running on macOS
|
1171
|
-
values from the table below:
|
1206
|
+
For locally hosted desktop web browsers running on macOS or Windows platforms, the `WEB_BROWSER` Environment Variable must
|
1207
|
+
be set to one of the values from the table below:
|
1172
1208
|
|
1173
1209
|
| `WEB_BROWSER` | **Desktop Platform** |
|
1174
1210
|
|--------------------|------------------------------------------------|
|
1175
|
-
| `chrome` |
|
1176
|
-
| `chrome_headless` |
|
1177
|
-
| `firefox` |
|
1178
|
-
| `firefox_headless` |
|
1179
|
-
| `edge` |
|
1180
|
-
| `edge_headless` |
|
1181
|
-
| `safari` |
|
1211
|
+
| `chrome` | macOS or Windows |
|
1212
|
+
| `chrome_headless` | macOS or Windows (headless - no visible UI) |
|
1213
|
+
| `firefox` | macOS or Windows |
|
1214
|
+
| `firefox_headless` | macOS or Windows (headless - no visible UI) |
|
1215
|
+
| `edge` | macOS or Windows |
|
1216
|
+
| `edge_headless` | macOS or Windows (headless - no visible UI) |
|
1217
|
+
| `safari` | macOS only |
|
1182
1218
|
| `ie` | Windows only (IE version 10.x or greater only) |
|
1183
1219
|
|
1184
1220
|
Refer to **section 8.6 (Using Browser specific Profiles in cucumber.yml)** below.
|
@@ -1186,7 +1222,8 @@ Refer to **section 8.6 (Using Browser specific Profiles in cucumber.yml)** below
|
|
1186
1222
|
|
1187
1223
|
#### Setting desktop browser window size
|
1188
1224
|
|
1189
|
-
To set the size of a desktop browser window, you set the `BROWSER_SIZE` Environment Variable to the desired width and height
|
1225
|
+
To set the size of a desktop browser window, you set the `BROWSER_SIZE` Environment Variable to the desired width and height
|
1226
|
+
in pixels as shown below:
|
1190
1227
|
|
1191
1228
|
BROWSER_SIZE=1600,1000
|
1192
1229
|
|
@@ -1197,8 +1234,9 @@ To maximize a desktop browser window, you set the `BROWSER_SIZE` Environment Var
|
|
1197
1234
|
|
1198
1235
|
#### Testing file downloads with desktop browsers
|
1199
1236
|
|
1200
|
-
File download functionality can be tested with locally hosted instances of Chrome, Edge, or Firefox desktop browsers. Your
|
1201
|
-
a `/downloads` folder at the same level as the `/config` and `/features` folders, as depicted
|
1237
|
+
File download functionality can be tested with locally hosted instances of Chrome, Edge, or Firefox desktop browsers. Your
|
1238
|
+
automation project must include a `/downloads` folder at the same level as the `/config` and `/features` folders, as depicted
|
1239
|
+
below:
|
1202
1240
|
|
1203
1241
|
my_automation_project
|
1204
1242
|
├── config
|
@@ -1208,9 +1246,9 @@ a `/downloads` folder at the same level as the `/config` and `/features` folders
|
|
1208
1246
|
└── README.md
|
1209
1247
|
|
1210
1248
|
|
1211
|
-
When running tests in multiple concurrent threads using the `parallel_tests` gem, a new folder will be created within the
|
1212
|
-
test thread. This is to ensure that files downloaded in each test thread are isolated from tests
|
1213
|
-
`/downloads` folder structure for 4 parallel threads is depicted below:
|
1249
|
+
When running tests in multiple concurrent threads using the `parallel_tests` gem, a new folder will be created within the
|
1250
|
+
`/downloads` folder for each test thread. This is to ensure that files downloaded in each test thread are isolated from tests
|
1251
|
+
running in other parallel threads. An example of the`/downloads` folder structure for 4 parallel threads is depicted below:
|
1214
1252
|
|
1215
1253
|
my_automation_project
|
1216
1254
|
├── config
|
@@ -1224,10 +1262,10 @@ test thread. This is to ensure that files downloaded in each test thread are iso
|
|
1224
1262
|
└── README.md
|
1225
1263
|
|
1226
1264
|
|
1227
|
-
When testing file downloads using a local instance of Firefox, you will need to specify the MIME types of the various file types
|
1228
|
-
be downloading. This is accomplished by setting the `MIME_TYPES` Environment Variable to a comma-delimited
|
1229
|
-
be accepted. This list is required as it will prevent Firefox from displaying the
|
1230
|
-
example of a list of MIME types is depicted below:
|
1265
|
+
When testing file downloads using a local instance of Firefox, you will need to specify the MIME types of the various file types
|
1266
|
+
that your tests will be downloading. This is accomplished by setting the `MIME_TYPES` Environment Variable to a comma-delimited
|
1267
|
+
string containing the list of MIME types to be accepted. This list is required as it will prevent Firefox from displaying the
|
1268
|
+
File Download modal dialog, which will halt your automated tests. An example of a list of MIME types is depicted below:
|
1231
1269
|
|
1232
1270
|
MIME_TYPES='images/jpeg, application/pdf, application/octet-stream'
|
1233
1271
|
|
@@ -1236,10 +1274,11 @@ A detailed list of file MIME types can be found [here](https://www.freeformatter
|
|
1236
1274
|
|
1237
1275
|
### Locally hosted emulated mobile web browser
|
1238
1276
|
|
1239
|
-
You can run your tests against mobile device browsers that are emulated within a locally hosted instance of a Chrome desktop
|
1240
|
-
Windows. The specified mobile browser's user agent, CSS screen dimensions, and default screen orientation
|
1241
|
-
local Chrome browser instance. You may even specify the emulated device's screen orientation.
|
1242
|
-
the `WEB_BROWSER` Environment Variable must be set to one of the values from
|
1277
|
+
You can run your tests against mobile device browsers that are emulated within a locally hosted instance of a Chrome desktop
|
1278
|
+
browser on macOS or Windows. The specified mobile browser's user agent, CSS screen dimensions, and default screen orientation
|
1279
|
+
will be automatically set within the local Chrome browser instance. You may even specify the emulated device's screen orientation.
|
1280
|
+
For locally hosted emulated mobile web browsers, the `WEB_BROWSER` Environment Variable must be set to one of the values from
|
1281
|
+
the table below:
|
1243
1282
|
|
1244
1283
|
| `WEB_BROWSER` | `HOST_BROWSER` | **CSS Screen Dimensions** | **Default Orientation** | **OS Version** |
|
1245
1284
|
|-----------------------|----------------|---------------------------|-------------------------|-------------------------------------------|
|
@@ -1291,18 +1330,20 @@ the `WEB_BROWSER` Environment Variable must be set to one of the values from the
|
|
1291
1330
|
| `blackberry_leap` | `chrome` | 360 x 640 | portrait | BlackBerry 10 OS |
|
1292
1331
|
| `blackberry_passport` | `chrome` | 504 x 504 | square | BlackBerry 10 OS |
|
1293
1332
|
|
1294
|
-
To change the emulated device's screen orientation from the default setting, set the `ORIENTATION` Environment Variable to
|
1333
|
+
To change the emulated device's screen orientation from the default setting, set the `ORIENTATION` Environment Variable to
|
1334
|
+
either `portrait` or `landscape`.
|
1295
1335
|
|
1296
|
-
To use a local instance of the Chrome desktop browser to host the emulated mobile web browser, you must set the `HOST_BROWSER`
|
1297
|
-
to `chrome`.
|
1336
|
+
To use a local instance of the Chrome desktop browser to host the emulated mobile web browser, you must set the `HOST_BROWSER`
|
1337
|
+
Environment Variable to `chrome`.
|
1298
1338
|
|
1299
1339
|
Refer to **section 8.6 (Using Browser specific Profiles in cucumber.yml)** below.
|
1300
1340
|
|
1301
1341
|
|
1302
1342
|
#### User defined mobile device profiles
|
1303
1343
|
|
1304
|
-
User defined mobile device profiles can be specified in a `device.yml` file for testing locally hosted emulated mobile web
|
1305
|
-
of the Chrome desktop browser. The user specified device profiles must be located at
|
1344
|
+
User defined mobile device profiles can be specified in a `device.yml` file for testing locally hosted emulated mobile web
|
1345
|
+
browsers running in an instance of the Chrome desktop browser. The user specified device profiles must be located at
|
1346
|
+
`config/data/devices/devices.yml` as depicted below:
|
1306
1347
|
|
1307
1348
|
my_automation_project
|
1308
1349
|
├── config
|
@@ -1331,7 +1372,8 @@ The format for a new device profile is:
|
|
1331
1372
|
|
1332
1373
|
### Selenium Grid 4 and Dockerized Selenium Grid 4 hosted desktop and emulated mobile web browsers
|
1333
1374
|
|
1334
|
-
For remote desktop and emulated mobile web browsers running on Selenium Grid 4 or Dockerized Selenium Grid 4 environments
|
1375
|
+
For remote desktop and emulated mobile web browsers running on Selenium Grid 4 or Dockerized Selenium Grid 4 environments
|
1376
|
+
as described in the table below.
|
1335
1377
|
|
1336
1378
|
| **Environment Variable** | **Description** |
|
1337
1379
|
|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
@@ -1346,18 +1388,19 @@ Refer to **section 8.6 (Using Browser specific Profiles in cucumber.yml)** below
|
|
1346
1388
|
|
1347
1389
|
#### Mobile Safari browser on iOS Simulators or iOS Physical Devices
|
1348
1390
|
|
1349
|
-
You can run your mobile web tests against the mobile Safari browser on simulated iOS devices or physically connected iOS devices
|
1350
|
-
|
1351
|
-
installed and required as described in **section 3.3 (Setup - Using Appium)** above.
|
1391
|
+
You can run your mobile web tests against the mobile Safari browser on simulated iOS devices or physically connected iOS devices
|
1392
|
+
using Appium and XCode on macOS. You must install Appium, XCode, and the iOS version-specific device simulators for XCode. You
|
1393
|
+
must also ensure that the `appium_capybara` gem is installed and required as described in **section 3.3 (Setup - Using Appium)** above.
|
1352
1394
|
|
1353
|
-
Information about Appium setup and configuration requirements for testing on physically connected iOS devices can be found
|
1354
|
-
The Appium server
|
1395
|
+
Information about Appium setup and configuration requirements for testing on physically connected iOS devices can be found
|
1396
|
+
on [this page](https://github.com/appium/appium/blob/master/docs/en/drivers/ios-xcuitest-real-devices.md). The Appium server
|
1397
|
+
must be running prior to invoking Cucumber to run your features/scenarios.
|
1355
1398
|
|
1356
1399
|
Once your test environment is properly configured, the following **Environment Variables** must be set as described in the table below.
|
1357
1400
|
|
1358
1401
|
| **Environment Variable** | **Description** |
|
1359
1402
|
|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
1360
|
-
| `
|
1403
|
+
| `DRIVER` | Must be set to `appium` |
|
1361
1404
|
| `APP_PLATFORM_NAME` | Must be set to `iOS` |
|
1362
1405
|
| `APP_BROWSER` | Must be set to `Safari` |
|
1363
1406
|
| `APP_VERSION` | Must be set to `15.4`, `14.5`, or which ever iOS version you wish to run within the XCode Simulator |
|
@@ -1388,19 +1431,21 @@ Refer to **section 8.6 (Using Browser specific Profiles in cucumber.yml)** below
|
|
1388
1431
|
|
1389
1432
|
#### Mobile Chrome or Android browsers on Android Studio Virtual Device emulators
|
1390
1433
|
|
1391
|
-
You can run your mobile web tests against the mobile Chrome or Android browser on emulated Android devices using Appium and
|
1392
|
-
must install Android Studio, the desired Android version-specific virtual device emulators, and
|
1393
|
-
|
1394
|
-
|
1434
|
+
You can run your mobile web tests against the mobile Chrome or Android browser on emulated Android devices using Appium and
|
1435
|
+
Android Studio on macOS. You must install Android Studio, the desired Android version-specific virtual device emulators, and
|
1436
|
+
Appium. Refer to [this page](http://appium.io/docs/en/drivers/android-uiautomator2/index.html) for information on configuring
|
1437
|
+
Appium to work with the Android SDK. You must also ensure that the `appium_capybara` gem is installed and required as described
|
1438
|
+
in **section 3.3 (Setup - Using Appium)** above.
|
1395
1439
|
|
1396
1440
|
The Appium server must be running prior to invoking Cucumber to run your features/scenarios. Refer to [this page](https://appium.io/docs/en/writing-running-appium/web/chromedriver/index.html)
|
1397
|
-
for information on configuring Appium to use the correct version of Chromedriver required to work with the web browser supported
|
1441
|
+
for information on configuring Appium to use the correct version of Chromedriver required to work with the web browser supported
|
1442
|
+
by each Android OS version.
|
1398
1443
|
|
1399
1444
|
Once your test environment is properly configured, the following **Environment Variables** must be set as described in the table below.
|
1400
1445
|
|
1401
1446
|
| **Environment Variable** | **Description** |
|
1402
1447
|
|---------------------------|--------------------------------------------------------------------------------------------------------------------------------|
|
1403
|
-
| `
|
1448
|
+
| `DRIVER` | Must be set to `appium` |
|
1404
1449
|
| `APP_PLATFORM_NAME` | Must be set to `Android` |
|
1405
1450
|
| `APP_BROWSER` | Must be set to `Chrome` or `Browser` |
|
1406
1451
|
| `APP_VERSION` | Must be set to `12.0`, or which ever Android OS version you wish to run with the Android Virtual Device |
|
@@ -1421,8 +1466,8 @@ Refer to **section 8.6 (Using Browser specific Profiles in cucumber.yml)** below
|
|
1421
1466
|
#### Starting and stopping Appium Server
|
1422
1467
|
|
1423
1468
|
The Appium server must be running prior to invoking Cucumber to run your features/scenarios on mobile simulators or physical
|
1424
|
-
device. To programmatically control the starting and stopping of Appium server with the execution of your automated tests,
|
1425
|
-
the code shown below in your `hooks.rb` file.
|
1469
|
+
device. To programmatically control the starting and stopping of Appium server with the execution of your automated tests,
|
1470
|
+
place the code shown below in your `hooks.rb` file.
|
1426
1471
|
|
1427
1472
|
BeforeAll do
|
1428
1473
|
# start Appium Server if APPIUM_SERVER = 'run' and target browser is a mobile simulator or device
|
@@ -1442,9 +1487,9 @@ the code shown below in your `hooks.rb` file.
|
|
1442
1487
|
end
|
1443
1488
|
|
1444
1489
|
|
1445
|
-
The `APPIUM_SERVER` environment variable must be set to `run` in order to programmatically start and stop Appium server. This
|
1446
|
-
set by adding the following to your `cucumber.yml` file and including `-p run_appium` in your command line when starting
|
1447
|
-
test suite(s):
|
1490
|
+
The `APPIUM_SERVER` environment variable must be set to `run` in order to programmatically start and stop Appium server. This
|
1491
|
+
can be set by adding the following to your `cucumber.yml` file and including `-p run_appium` in your command line when starting
|
1492
|
+
your Cucumber test suite(s):
|
1448
1493
|
|
1449
1494
|
run_appium: APPIUM_SERVER=run
|
1450
1495
|
|
@@ -1454,26 +1499,26 @@ Refer to **section 8.6 (Using Browser specific Profiles in cucumber.yml)** below
|
|
1454
1499
|
|
1455
1500
|
### Remote cloud hosted desktop and mobile web browsers
|
1456
1501
|
|
1457
|
-
You can run your automated tests against remote cloud hosted desktop and mobile web browsers using the BrowserStack, SauceLabs,
|
1458
|
-
LambdaTest services. If your tests are running against a web site hosted on your local computer (`localhost`),
|
1459
|
-
your LAN, you must set the `TUNNELING` Environment Variable to `true`.
|
1502
|
+
You can run your automated tests against remote cloud hosted desktop and mobile web browsers using the BrowserStack, SauceLabs,
|
1503
|
+
TestingBot, or LambdaTest services. If your tests are running against a web site hosted on your local computer (`localhost`),
|
1504
|
+
or on a staging server inside your LAN, you must set the `TUNNELING` Environment Variable to `true`.
|
1460
1505
|
|
1461
|
-
Due to lack of support for Selenium 4.x and the W3C browser capabilities protocol, support for CrossBrowserTesting and Gridlastic
|
1462
|
-
Selenium grid services was removed as of version 4.1 of this gem. If your testing requires access to either of those
|
1463
|
-
Selenium version 3.x, you should use earlier versions of this gem.
|
1506
|
+
Due to lack of support for Selenium 4.x and the W3C browser capabilities protocol, support for CrossBrowserTesting and Gridlastic
|
1507
|
+
cloud hosted Selenium grid services was removed as of version 4.1 of this gem. If your testing requires access to either of those
|
1508
|
+
services, or support for Selenium version 3.x, you should use earlier versions of this gem.
|
1464
1509
|
|
1465
1510
|
Refer to **section 8.6 (Using Browser specific Profiles in cucumber.yml)** below.
|
1466
1511
|
|
1467
1512
|
|
1468
1513
|
#### Remote desktop browsers on the BrowserStack service
|
1469
1514
|
|
1470
|
-
For remotely hosted desktop web browsers on the BrowserStack service, the following **Environment Variables** must be set as
|
1471
|
-
the table below. Refer to the [Browserstack-specific capabilities chart page](https://www.browserstack.com/automate/capabilities?tag=selenium-4)
|
1515
|
+
For remotely hosted desktop web browsers on the BrowserStack service, the following **Environment Variables** must be set as
|
1516
|
+
described in the table below. Refer to the [Browserstack-specific capabilities chart page](https://www.browserstack.com/automate/capabilities?tag=selenium-4)
|
1472
1517
|
for information regarding the specific capabilities.
|
1473
1518
|
|
1474
1519
|
| **Environment Variable** | **Description** |
|
1475
1520
|
|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
1476
|
-
| `
|
1521
|
+
| `DRIVER` | Must be set to `browserstack` |
|
1477
1522
|
| `BS_USERNAME` | Must be set to your BrowserStack account user name |
|
1478
1523
|
| `BS_AUTHKEY` | Must be set to your BrowserStack account access key |
|
1479
1524
|
| `BS_OS` | Must be set to `OS X` or `Windows` |
|
@@ -1507,7 +1552,7 @@ for information regarding the specific capabilities.
|
|
1507
1552
|
|
1508
1553
|
| **Environment Variable** | **Description** |
|
1509
1554
|
|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
1510
|
-
| `
|
1555
|
+
| `DRIVER` | Must be set to `browserstack` |
|
1511
1556
|
| `BS_USERNAME` | Must be set to your BrowserStack account user name |
|
1512
1557
|
| `BS_AUTHKEY` | Must be set to your BrowserStack account access key |
|
1513
1558
|
| `BS_OS` | Must be set to `ios` or `android` |
|
@@ -1524,6 +1569,7 @@ for information regarding the specific capabilities.
|
|
1524
1569
|
| `NETWORK_LOGS` | [Optional] Capture network logs (`true` or `false`) |
|
1525
1570
|
| `APPIUM_LOGS` | [Optional] Generate Appium logs (`true` or `false`) |
|
1526
1571
|
|
1572
|
+
|
1527
1573
|
#### Remote desktop browsers on the Sauce Labs service
|
1528
1574
|
|
1529
1575
|
For remotely hosted desktop web browsers on the Sauce Labs service, the following **Environment Variables** must be set as described in the
|
@@ -1532,7 +1578,7 @@ to obtain information regarding the specific capabilities.
|
|
1532
1578
|
|
1533
1579
|
| **Environment Variable** | **Description** |
|
1534
1580
|
|--------------------------|----------------------------------------------------------------------------------------------------------------------------|
|
1535
|
-
| `
|
1581
|
+
| `DRIVER` | Must be set to `saucelabs` |
|
1536
1582
|
| `SL_USERNAME` | Must be set to your Sauce Labs account user name or email address |
|
1537
1583
|
| `SL_AUTHKEY` | Must be set to your Sauce Labs account access key |
|
1538
1584
|
| `DATA_CENTER` | Must be set to your Sauce Labs account Data Center assignment (`us-west-1`, `eu-central-1`, `apac-southeast-1`) |
|
@@ -1543,6 +1589,7 @@ to obtain information regarding the specific capabilities.
|
|
1543
1589
|
| `BROWSER_SIZE ` | [Optional] Specify width, height of browser window |
|
1544
1590
|
| `RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`) |
|
1545
1591
|
|
1592
|
+
|
1546
1593
|
#### Remote desktop browsers on the TestingBot service
|
1547
1594
|
|
1548
1595
|
For remotely hosted desktop web browsers on the TestingBot service, the following **Environment Variables** must be set as described in
|
@@ -1551,7 +1598,7 @@ regarding the specific capabilities.
|
|
1551
1598
|
|
1552
1599
|
| **Environment Variable** | **Description** |
|
1553
1600
|
|--------------------------|-------------------------------------------------------------------------------------------------------------------|
|
1554
|
-
| `
|
1601
|
+
| `DRIVER` | Must be set to `testingbot` |
|
1555
1602
|
| `TB_USERNAME` | Must be set to your TestingBot account user name |
|
1556
1603
|
| `TB_AUTHKEY` | Must be set to your TestingBot account access key |
|
1557
1604
|
| `TB_OS` | Refer to `platform` capability in chart |
|
@@ -1561,6 +1608,27 @@ regarding the specific capabilities.
|
|
1561
1608
|
| `RESOLUTION` | [Optional] Possible values: `800x600`, `1024x768`, `1280x960`, `1280x1024`, `1600x1200`, `1920x1200`, `2560x1440` |
|
1562
1609
|
| `BROWSER_SIZE` | [Optional] Specify width, height of browser window |
|
1563
1610
|
|
1611
|
+
|
1612
|
+
#### Remote mobile browsers on the TestingBot service
|
1613
|
+
|
1614
|
+
For remotely hosted mobile web browsers iOS simulators and Android emulators on the TestingBot service, the following Environment
|
1615
|
+
Variables must be set as described in the table below.
|
1616
|
+
|
1617
|
+
| **Environment Variable** | **Description** |
|
1618
|
+
|--------------------------|-------------------------------------------------------------------------------------------------|
|
1619
|
+
| `DRIVER` | Must be set to `testingbot` |
|
1620
|
+
| `TB_USERNAME` | Must be set to your TestingBot account user name |
|
1621
|
+
| `TB_AUTHKEY` | Must be set to your TestingBot account access key |
|
1622
|
+
| `TB_PLATFORM` | Must be set to `iOS` or `ANDROID` |
|
1623
|
+
| `TB_OS` | Must be set to `iOS` or `ANDROID` |
|
1624
|
+
| `TB_BROWSER` | Must be set to `safari` (for iOS) or `chrome` (for Android) |
|
1625
|
+
| `TB_VERSION` | Refer to `version` capability in chart |
|
1626
|
+
| `TB_DEVICE` | Refer to `deviceName` capability in chart |
|
1627
|
+
| `DEVICE_TYPE` | Must be set to `phone` or `tablet` |
|
1628
|
+
| `TUNNELING` | [Optional] Must be `true` if you are testing against internal/local servers (`true` or `false`) |
|
1629
|
+
| `ORIENTATION` | [Optional] Set to `portrait` or `landscape` |
|
1630
|
+
|
1631
|
+
|
1564
1632
|
#### Remote desktop browsers on the LambdaTest service
|
1565
1633
|
|
1566
1634
|
For remotely hosted desktop web browsers on the LambdaTest service, the following **Environment Variables** must be set as described in the table
|
@@ -1569,7 +1637,7 @@ to obtain information regarding the specific capabilities.
|
|
1569
1637
|
|
1570
1638
|
| **Environment Variable** | **Description** |
|
1571
1639
|
|--------------------------|------------------------------------------------------------------------------------------|
|
1572
|
-
| `
|
1640
|
+
| `DRIVER` | Must be set to `lambdatest` |
|
1573
1641
|
| `LT_USERNAME` | Must be set to your LambdaTest account user name or email address |
|
1574
1642
|
| `LT_AUTHKEY` | Must be set to your LambdaTest account access key |
|
1575
1643
|
| `LT_OS` | Refer to `platformName` capability in the sample script of the Wizard |
|
@@ -1582,16 +1650,18 @@ to obtain information regarding the specific capabilities.
|
|
1582
1650
|
| `ALLOW_COOKIES` | [Optional] Allow all cookies (`true` or `false`) - for Safari browsers only |
|
1583
1651
|
| `CONSOLE_LOGS` | [Optional] Used to capture browser console logs. |
|
1584
1652
|
|
1653
|
+
|
1585
1654
|
### Using Browser specific Profiles in cucumber.yml
|
1586
1655
|
|
1587
|
-
While you can set **Environment Variables** in the command line when invoking Cucumber, a preferred method of specifying and
|
1588
|
-
target web browsers is to create browser specific **Profiles** that set the appropriate **Environment Variables** for
|
1589
|
-
in your `cucumber.yml` file.
|
1656
|
+
While you can set **Environment Variables** in the command line when invoking Cucumber, a preferred method of specifying and
|
1657
|
+
managing target web browsers is to create browser specific **Profiles** that set the appropriate **Environment Variables** for
|
1658
|
+
each target browser in your `cucumber.yml` file.
|
1590
1659
|
|
1591
|
-
Below is a list of Cucumber **Profiles** for supported locally and remotely hosted desktop and mobile web browsers (put these
|
1592
|
-
`cucumber.yml` file). Before you can use the BrowserStack, SauceLabs, TestingBot or LambdaTest services, you will
|
1593
|
-
*INSERT USER NAME HERE* and *INSERT PASSWORD HERE* placeholder text with your user account and authorization
|
1594
|
-
that you intend to connect with.
|
1660
|
+
Below is a list of Cucumber **Profiles** for supported locally and remotely hosted desktop and mobile web browsers (put these
|
1661
|
+
in in your`cucumber.yml` file). Before you can use the BrowserStack, SauceLabs, TestingBot or LambdaTest services, you will
|
1662
|
+
need to replace the*INSERT USER NAME HERE* and *INSERT PASSWORD HERE* placeholder text with your user account and authorization
|
1663
|
+
code for the cloud service(s) that you intend to connect with. However, cloud service credentials should not be stored as text
|
1664
|
+
in your `cucumber.yml` file where it can be exposed by anyone with access to your version control system
|
1595
1665
|
|
1596
1666
|
|
1597
1667
|
<% desktop = "--tags @desktop --require features BROWSER_TILE=true BROWSER_SIZE=1500,1000" %>
|
@@ -1694,7 +1764,7 @@ that you intend to connect with.
|
|
1694
1764
|
# NOTE: Requires installation of XCode, iOS version specific target simulators, Appium, and the appium_capybara gem
|
1695
1765
|
#==============
|
1696
1766
|
|
1697
|
-
appium_ios:
|
1767
|
+
appium_ios: DRIVER=appium AUTOMATION_ENGINE=XCUITest APP_PLATFORM_NAME="ios" APP_BROWSER="Safari" NEW_COMMAND_TIMEOUT=30 SHOW_SIM_KEYBOARD=false
|
1698
1768
|
app_ios_15: --profile appium_ios APP_VERSION="15.4"
|
1699
1769
|
ipad_pro_12_15_sim: --profile app_ios_15 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (12.9-inch) (5th generation)"
|
1700
1770
|
ipad_air_15_sim: --profile app_ios_15 DEVICE_TYPE=tablet APP_DEVICE="iPad Air (5th generation)" <%= desktop %>
|
@@ -1715,16 +1785,18 @@ that you intend to connect with.
|
|
1715
1785
|
# NOTE: Requires installation of Android Studio, Android version specific virtual device simulators, Appium, and the appium_capybara gem
|
1716
1786
|
#==============
|
1717
1787
|
|
1718
|
-
appium_android:
|
1788
|
+
appium_android: DRIVER=appium APP_PLATFORM_NAME="Android" <%= mobile %>
|
1719
1789
|
app_android_12: --profile appium_android APP_BROWSER="Chrome" APP_VERSION="12.0"
|
1720
1790
|
pixel_c_api31_sim: --profile app_android_12 DEVICE_TYPE=tablet APP_DEVICE="Pixel_C_API_31"
|
1721
1791
|
|
1722
1792
|
|
1723
1793
|
#==============
|
1724
1794
|
# profiles for remotely hosted web browsers on the BrowserStack service
|
1795
|
+
# WARNING: Credentials should not be stored as text in your cucumber.yml file where it can be exposed by anyone with access
|
1796
|
+
# to your version control system
|
1725
1797
|
#==============
|
1726
1798
|
|
1727
|
-
browserstack:
|
1799
|
+
browserstack: DRIVER=browserstack BS_USERNAME="<INSERT USER NAME HERE>" BS_AUTHKEY="<INSERT PASSWORD HERE>"
|
1728
1800
|
bs_desktop: --profile browserstack <%= desktop %> RESOLUTION="1920x1080"
|
1729
1801
|
bs_mobile: --profile browserstack <%= mobile %>
|
1730
1802
|
|
@@ -1752,9 +1824,11 @@ that you intend to connect with.
|
|
1752
1824
|
|
1753
1825
|
#==============
|
1754
1826
|
# profiles for remotely hosted web browsers on the SauceLabs service
|
1827
|
+
# WARNING: Credentials should not be stored as text in your cucumber.yml file where it can be exposed by anyone with access
|
1828
|
+
# to your version control system
|
1755
1829
|
#==============
|
1756
1830
|
|
1757
|
-
saucelabs:
|
1831
|
+
saucelabs: DRIVER=saucelabs SL_USERNAME="<INSERT USER NAME HERE>" SL_AUTHKEY="<INSERT PASSWORD HERE>" DATA_CENTER="<INSERT DATA CENTER HERE"
|
1758
1832
|
sl_desktop: --profile saucelabs <%= desktop %>
|
1759
1833
|
sl_mobile: --profile saucelabs <%= mobile %>
|
1760
1834
|
|
@@ -1776,9 +1850,11 @@ that you intend to connect with.
|
|
1776
1850
|
|
1777
1851
|
#==============
|
1778
1852
|
# profiles for remotely hosted web browsers on the TestingBot service
|
1853
|
+
# WARNING: Credentials should not be stored as text in your cucumber.yml file where it can be exposed by anyone with access
|
1854
|
+
# to your version control system
|
1779
1855
|
#==============
|
1780
1856
|
|
1781
|
-
testingbot:
|
1857
|
+
testingbot: DRIVER=testingbot TB_USERNAME="<INSERT USER NAME HERE>" TB_AUTHKEY="<INSERT PASSWORD HERE>"
|
1782
1858
|
tb_desktop: --profile testingbot <%= desktop %> RESOLUTION="1920x1200"
|
1783
1859
|
|
1784
1860
|
# TestingBot macOS desktop browser profiles
|
@@ -1795,9 +1871,11 @@ that you intend to connect with.
|
|
1795
1871
|
|
1796
1872
|
#==============
|
1797
1873
|
# profiles for remotely hosted web browsers on the LambdaTest service
|
1874
|
+
# WARNING: Credentials should not be stored as text in your cucumber.yml file where it can be exposed by anyone with access
|
1875
|
+
# to your version control system
|
1798
1876
|
#==============
|
1799
1877
|
|
1800
|
-
lambdatest:
|
1878
|
+
lambdatest: DRIVER=lambdatest LT_USERNAME=<INSERT USER NAME HERE> LT_AUTHKEY=<INSERT PASSWORD HERE>
|
1801
1879
|
lt_desktop: --profile lambdatest <%= desktop %> RESOLUTION="2560x1440"
|
1802
1880
|
|
1803
1881
|
# LambdaTest macOS desktop browser profiles
|
@@ -1812,27 +1890,27 @@ that you intend to connect with.
|
|
1812
1890
|
lt_i0_win11: --profile lt_win10 LT_BROWSER="Internet Explorer" LT_VERSION="11.0"
|
1813
1891
|
|
1814
1892
|
|
1815
|
-
To specify a locally hosted target browser using a profile at runtime, you use the flag `--profile` or `-p` followed by the
|
1816
|
-
invoking Cucumber in the command line. For instance, the following command invokes Cucumber and specifies
|
1817
|
-
will be used as the target web browser:
|
1893
|
+
To specify a locally hosted target browser using a profile at runtime, you use the flag `--profile` or `-p` followed by the
|
1894
|
+
profile name when invoking Cucumber in the command line. For instance, the following command invokes Cucumber and specifies
|
1895
|
+
that a local instance of Firefox will be used as the target web browser:
|
1818
1896
|
|
1819
1897
|
cucumber -p firefox
|
1820
1898
|
|
1821
1899
|
|
1822
|
-
The following command specifies that Cucumber will run tests against an instance of Chrome hosted within a Dockerized Selenium
|
1823
|
-
environment:
|
1900
|
+
The following command specifies that Cucumber will run tests against an instance of Chrome hosted within a Dockerized Selenium
|
1901
|
+
Grid 4 environment:
|
1824
1902
|
|
1825
1903
|
cucumber -p chrome -p grid
|
1826
1904
|
|
1827
1905
|
|
1828
|
-
The following command specifies that Cucumber will run tests against a local instance of Chrome, which will be used to emulate
|
1829
|
-
in landscape orientation:
|
1906
|
+
The following command specifies that Cucumber will run tests against a local instance of Chrome, which will be used to emulate
|
1907
|
+
an iPad Pro in landscape orientation:
|
1830
1908
|
|
1831
1909
|
cucumber -p ipad_pro -p landscape
|
1832
1910
|
|
1833
1911
|
|
1834
|
-
The following command specifies that Cucumber will run tests against an iPad Pro (12.9-inch) (5th generation) with iOS version
|
1835
|
-
XCode Simulator in landscape orientation:
|
1912
|
+
The following command specifies that Cucumber will run tests against an iPad Pro (12.9-inch) (5th generation) with iOS version
|
1913
|
+
15.4 in an XCode Simulator in landscape orientation:
|
1836
1914
|
|
1837
1915
|
cucumber -p ipad_pro_12_15_sim -p landscape
|
1838
1916
|
|
@@ -1843,8 +1921,8 @@ You can ensure that Appium Server is running by including `-p run_appium` in you
|
|
1843
1921
|
cucumber -p ipad_pro_12_15_sim -p landscape -p run_appium
|
1844
1922
|
|
1845
1923
|
|
1846
|
-
The following command specifies that Cucumber will run tests against a remotely hosted Safari web browser running on a macOS
|
1847
|
-
virtual machine on the BrowserStack service:
|
1924
|
+
The following command specifies that Cucumber will run tests against a remotely hosted Safari web browser running on a macOS
|
1925
|
+
Monterey virtual machine on the BrowserStack service:
|
1848
1926
|
|
1849
1927
|
cucumber -p bs_safari_monterey
|
1850
1928
|
|
@@ -1877,7 +1955,7 @@ area sub-folders as needed. Likewise, `PageSection` class definitions should be
|
|
1877
1955
|
|
1878
1956
|
## Web Test Automation Framework Implementation
|
1879
1957
|
|
1880
|
-
<img src="https://i.imgur.com/
|
1958
|
+
<img src="https://i.imgur.com/lCT9HbK.jpg" alt="TestCentricity Web Framework Overview" title="TestCentricity Web Framework Overview">
|
1881
1959
|
|
1882
1960
|
|
1883
1961
|
|
@@ -1886,27 +1964,20 @@ area sub-folders as needed. Likewise, `PageSection` class definitions should be
|
|
1886
1964
|
TestCentricity™ Framework is Copyright (c) 2014-2022, Tony Mrozinski.
|
1887
1965
|
All rights reserved.
|
1888
1966
|
|
1889
|
-
Redistribution and use in source and binary forms, with or without
|
1890
|
-
|
1891
|
-
|
1892
|
-
1. Redistributions of source code must retain the above copyright notice,
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
1907
|
-
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
1908
|
-
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
1909
|
-
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
1910
|
-
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
1911
|
-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
1912
|
-
POSSIBILITY OF SUCH DAMAGE.
|
1967
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
|
1968
|
+
conditions are met:
|
1969
|
+
|
1970
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
1971
|
+
|
1972
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
|
1973
|
+
in the documentation and/or other materials provided with the distribution.
|
1974
|
+
|
1975
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived
|
1976
|
+
from this software without specific prior written permission.
|
1977
|
+
|
1978
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
1979
|
+
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
1980
|
+
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
1981
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
1982
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
1983
|
+
OR OTHERWISE)ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|