testcentricity 2.3.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +3 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/Gemfile +6 -0
  7. data/Gemfile.lock +93 -0
  8. data/LICENSE.txt +28 -0
  9. data/README.md +1634 -0
  10. data/Rakefile +1 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/lib/devices/devices.yml +344 -0
  14. data/lib/testcentricity.rb +144 -0
  15. data/lib/testcentricity/app_core/appium_connect_helper.rb +154 -0
  16. data/lib/testcentricity/app_core/appium_server.rb +69 -0
  17. data/lib/testcentricity/app_core/screen_objects_helper.rb +180 -0
  18. data/lib/testcentricity/app_core/screen_sections_helper.rb +332 -0
  19. data/lib/testcentricity/app_elements/app_element_helper.rb +293 -0
  20. data/lib/testcentricity/app_elements/button.rb +8 -0
  21. data/lib/testcentricity/app_elements/checkbox.rb +20 -0
  22. data/lib/testcentricity/app_elements/label.rb +8 -0
  23. data/lib/testcentricity/app_elements/list.rb +25 -0
  24. data/lib/testcentricity/app_elements/switch.rb +20 -0
  25. data/lib/testcentricity/app_elements/textfield.rb +12 -0
  26. data/lib/testcentricity/browser_helper.rb +174 -0
  27. data/lib/testcentricity/data_objects/data_objects_helper.rb +78 -0
  28. data/lib/testcentricity/data_objects/environment.rb +281 -0
  29. data/lib/testcentricity/data_objects/excel_helper.rb +242 -0
  30. data/lib/testcentricity/exception_queue_helper.rb +51 -0
  31. data/lib/testcentricity/utility_helpers.rb +28 -0
  32. data/lib/testcentricity/version.rb +3 -0
  33. data/lib/testcentricity/web_core/drag_drop_helper.rb +15 -0
  34. data/lib/testcentricity/web_core/page_objects_helper.rb +669 -0
  35. data/lib/testcentricity/web_core/page_sections_helper.rb +866 -0
  36. data/lib/testcentricity/web_core/webdriver_helper.rb +579 -0
  37. data/lib/testcentricity/web_elements/button.rb +8 -0
  38. data/lib/testcentricity/web_elements/cell_button.rb +8 -0
  39. data/lib/testcentricity/web_elements/cell_checkbox.rb +38 -0
  40. data/lib/testcentricity/web_elements/cell_element.rb +69 -0
  41. data/lib/testcentricity/web_elements/cell_image.rb +8 -0
  42. data/lib/testcentricity/web_elements/cell_radio.rb +31 -0
  43. data/lib/testcentricity/web_elements/checkbox.rb +100 -0
  44. data/lib/testcentricity/web_elements/file_field.rb +45 -0
  45. data/lib/testcentricity/web_elements/image.rb +34 -0
  46. data/lib/testcentricity/web_elements/label.rb +8 -0
  47. data/lib/testcentricity/web_elements/link.rb +8 -0
  48. data/lib/testcentricity/web_elements/list.rb +73 -0
  49. data/lib/testcentricity/web_elements/list_button.rb +8 -0
  50. data/lib/testcentricity/web_elements/list_checkbox.rb +38 -0
  51. data/lib/testcentricity/web_elements/list_element.rb +61 -0
  52. data/lib/testcentricity/web_elements/list_radio.rb +31 -0
  53. data/lib/testcentricity/web_elements/radio.rb +74 -0
  54. data/lib/testcentricity/web_elements/select_list.rb +197 -0
  55. data/lib/testcentricity/web_elements/siebel_open_ui_helper.rb +15 -0
  56. data/lib/testcentricity/web_elements/table.rb +612 -0
  57. data/lib/testcentricity/web_elements/textfield.rb +114 -0
  58. data/lib/testcentricity/web_elements/ui_elements_helper.rb +502 -0
  59. data/lib/testcentricity/world_extensions.rb +26 -0
  60. data/my_templates/default/method_details/setup.rb +3 -0
  61. data/spec/spec_helper.rb +14 -0
  62. data/spec/testcentricity_spec.rb +9 -0
  63. data/testcentricity.gemspec +47 -0
  64. metadata +328 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 97150cfd69ebee4848af8b0d2d9cf37e5ca816aa
4
+ data.tar.gz: 78104785082fbdc52d40793fc9bf1bb9199004c9
5
+ SHA512:
6
+ metadata.gz: 904ae29d561d67a8917ff72520ce10b9743d323edf934603dc744e6259280439c939dd6700a90229cbfba533276f25568681a3d02b30217c4655682ccb6489ff
7
+ data.tar.gz: 080dec95c5a11b14bd53926ef039c3c412f70b65e11c5efe4382e9c65392b66b25077e309d0a3f4c1a078ffcc28017135e3c0879188bad28d56a0377f60b9d11
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ testcentricity
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.3.0
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in testcentricity.gemspec
4
+ gemspec
5
+
6
+ gem 'redcarpet', :groups => [:development, :test]
data/Gemfile.lock ADDED
@@ -0,0 +1,93 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ testcentricity (3.0.1)
5
+ appium_lib
6
+ browserstack-local
7
+ capybara (>= 2.15, < 3.0)
8
+ childprocess (~> 0.5)
9
+ chronic (= 0.10.2)
10
+ faker
11
+ i18n
12
+ os
13
+ poltergeist
14
+ selenium-webdriver (>= 2.50.0, < 3.0)
15
+ spreadsheet (= 1.1.1)
16
+ test-unit
17
+
18
+ GEM
19
+ remote: https://rubygems.org/
20
+ specs:
21
+ addressable (2.5.2)
22
+ public_suffix (>= 2.0.2, < 4.0)
23
+ appium_lib (9.0.0)
24
+ awesome_print (~> 1.6)
25
+ json (~> 1.8)
26
+ nokogiri (~> 1.6, >= 1.6.6)
27
+ selenium-webdriver (~> 2.50)
28
+ tomlrb (~> 1.1)
29
+ awesome_print (1.8.0)
30
+ browserstack-local (1.3.0)
31
+ capybara (2.17.0)
32
+ addressable
33
+ mini_mime (>= 0.1.3)
34
+ nokogiri (>= 1.3.3)
35
+ rack (>= 1.0.0)
36
+ rack-test (>= 0.5.4)
37
+ xpath (>= 2.0, < 4.0)
38
+ childprocess (0.8.0)
39
+ ffi (~> 1.0, >= 1.0.11)
40
+ chronic (0.10.2)
41
+ cliver (0.3.2)
42
+ concurrent-ruby (1.0.5)
43
+ faker (1.8.7)
44
+ i18n (>= 0.7)
45
+ ffi (1.9.21)
46
+ i18n (0.9.3)
47
+ concurrent-ruby (~> 1.0)
48
+ json (1.8.6)
49
+ mini_mime (1.0.0)
50
+ mini_portile2 (2.3.0)
51
+ nokogiri (1.8.2)
52
+ mini_portile2 (~> 2.3.0)
53
+ os (1.0.0)
54
+ poltergeist (1.17.0)
55
+ capybara (~> 2.1)
56
+ cliver (~> 0.3.1)
57
+ websocket-driver (>= 0.2.0)
58
+ power_assert (1.1.1)
59
+ public_suffix (3.0.1)
60
+ rack (2.0.4)
61
+ rack-test (0.8.2)
62
+ rack (>= 1.0, < 3)
63
+ rake (12.3.0)
64
+ redcarpet (3.4.0)
65
+ ruby-ole (1.2.12.1)
66
+ rubyzip (1.2.1)
67
+ selenium-webdriver (2.53.4)
68
+ childprocess (~> 0.5)
69
+ rubyzip (~> 1.0)
70
+ websocket (~> 1.0)
71
+ spreadsheet (1.1.1)
72
+ ruby-ole (>= 1.0)
73
+ test-unit (3.2.7)
74
+ power_assert
75
+ tomlrb (1.2.6)
76
+ websocket (1.2.5)
77
+ websocket-driver (0.7.0)
78
+ websocket-extensions (>= 0.1.0)
79
+ websocket-extensions (0.1.3)
80
+ xpath (3.0.0)
81
+ nokogiri (~> 1.8)
82
+
83
+ PLATFORMS
84
+ ruby
85
+
86
+ DEPENDENCIES
87
+ bundler (~> 1.5)
88
+ rake
89
+ redcarpet
90
+ testcentricity!
91
+
92
+ BUNDLED WITH
93
+ 1.16.1
data/LICENSE.txt ADDED
@@ -0,0 +1,28 @@
1
+ TestCentricity (tm) Framework is Copyright (c) 2016-2018, Tony Mrozinski
2
+ All rights reserved.
3
+
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions, and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright
12
+ notice, this list of conditions, and the following disclaimer in the
13
+ documentation and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its contributors
16
+ may be used to endorse or promote products derived from this software without
17
+ specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
25
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
+ POSSIBILITY OF SUCH DAMAGE.
data/README.md ADDED
@@ -0,0 +1,1634 @@
1
+ # TestCentricityâ„¢
2
+
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
+
5
+
6
+ The TestCentricityâ„¢ Web core generic framework for desktop and mobile web site testing implements a Page Object and Data Object Model DSL for
7
+ use with Cucumber, Capybara, and Selenium-Webdriver.
8
+
9
+ The TestCentricityâ„¢ Web gem supports running automated tests against the following web test targets:
10
+ * locally hosted desktop browsers (Firefox*, Chrome, Safari, or IE)
11
+ * locally hosted emulated iOS Mobile Safari, Android, Windows Phone, or Blackberry mobile browsers (running within a local instance of Chrome)
12
+ * a "headless" browser (using Poltergeist and PhantomJS)
13
+ * mobile Safari browsers on iOS device simulators or physical iOS devices (using Appium and XCode on OS X)
14
+ * mobile Chrome or Android browsers on Android Studio virtual device emulators (using Appium and Android Studio on OS X)
15
+ * cloud hosted desktop (Firefox, Chrome, Safari, IE, or Edge) or mobile (iOS Mobile Safari or Android) web browsers using the [Browserstack](https://www.browserstack.com/list-of-browsers-and-platforms?product=automate),
16
+ [Sauce Labs](https://saucelabs.com/open-source#automated-testing-platform), [CrossBrowserTesting](https://crossbrowsertesting.com/selenium-testing), or
17
+ [TestingBot](https://testingbot.com/features) services.
18
+ * web portals utilizing JavaScript front end application frameworks like Ember, React, Angular, and GWT
19
+ * enterprise web portals build using Siebel Open UI
20
+
21
+
22
+ **Note:** Test execution against local instances of Firefox version 48 or greater is currently not supported by the TestCentricityâ„¢ Web gem. Testing with
23
+ locally hosted instances of Firefox 48 or greater requires Marionette (aka geckodriver) and selenium-webdriver version 3.x, both of which are currently
24
+ feature incomplete and potentially unstable. More information can be found [here](https://github.com/teamcapybara/capybara/issues/1710).
25
+
26
+ TestCentricityâ„¢ will be updated to support testing with Selenium-WebDriver version 3.x as soon as a stable version is available that **fully** supports locally
27
+ hosted instances of Chrome, Firefox, Safari, and IE web browsers.
28
+
29
+
30
+ ## What's New
31
+ ###Version 2.3.13
32
+
33
+ * Added `AppiumServer.start`, `AppiumServer.running?`, and `AppiumServer.stop` methods for starting and stopping the Appium Server prior to executing tests on
34
+ iOS physical devices or simulators, or Android virtual device emulators.
35
+
36
+ ###Version 2.3.12
37
+
38
+ * Added `Environ.is_simulator?` and `Environ.is_web?` methods.
39
+
40
+ ###Version 2.3.11
41
+
42
+ * Added support for running tests in Mobile Safari browser on physical iOS devices.
43
+ * Updated device profiles for iPhone 7 (iOS 10) with Mobile Firefox browser and iPad (iOS 10) with Mobile Firefox browser.
44
+
45
+ ###Version 2.3.10
46
+
47
+ * Added support for running tests in mobile Chrome or Android browsers on Android Studio virtual device emulators.
48
+ * Added `displayed?`, `get_all_items_count`, and `get_all_list_items` methods to `PageSection` class.
49
+ * Added `get_all_items_count`, and `get_all_list_items` methods to `List` class.
50
+
51
+ ###Version 2.3.9
52
+
53
+ * Updated `PageObject.populate_data_fields` and `PageSection.populate_data_fields` methods to accept optional `wait_time` parameter.
54
+ * Updated device profiles for iPhone 7 (iOS 10) with MS Edge browser, iPhone 7 (iOS 10) with Chrome browser, and iPhone 7 (iOS 10) with Firefox browser.
55
+ * Updated device profiles for iPad (iOS 10) with Chrome browser and iPad (iOS 10) with Firefox browser.
56
+
57
+ ###Version 2.3.7
58
+
59
+ * Added `width`, `height`, `x`, `y`, and `displayed?` methods to `UIElement` class.
60
+
61
+ ###Version 2.3.6
62
+
63
+ * Added `TextField.clear` method for deleting the contents of text fields. This method should trigger the `onchange` event for the associated text field.
64
+
65
+ ###Version 2.3.5
66
+
67
+ * Updated `PageObject.populate_data_fields` and `PageSection.populate_data_fields` methods to be compatible with Redactor editor fields.
68
+ * Updated device profiles for iPhone 7 (iOS 10) with MS Edge browser, iPhone 7 (iOS 10) with Chrome browser, and iPhone 7 (iOS 10) with Firefox browser.
69
+
70
+ ###Version 2.3.3
71
+
72
+ * Added device profile for iPhone 7 (iOS 10) with MS Edge browser.
73
+
74
+ ###Version 2.3.1
75
+
76
+ * When testing using remotely hosted browsers on the BrowserStack service, the BrowserStack Local instance is automatically started if the `TUNNELING`
77
+ Environment Variable is set to `true`. `Environ.tunneling` will be set to true if the BrowserStack Local instance is succesfully started.
78
+ * Added `TestCentricity::WebDriverConnect.close_tunnel` method to close BrowserStack Local instance when Local testing is enabled. Refer to the
79
+ **Remotely hosted desktop and mobile web browsers** section for information on usage.
80
+
81
+ ###Version 2.2.0
82
+
83
+ * CSS selectors or XPath expressions may be used as locators for all types of **UI Elements**, including tables.
84
+
85
+ ###Version 2.1.10
86
+
87
+ * Added device profiles for iPhone 7 (iOS 10) with Mobile Firefox browser and iPad (iOS 10) with Mobile Firefox browser.
88
+
89
+ ###Version 2.1.8
90
+
91
+ * Added `PageSection.verify_list_items` method for **Indexed PageSection Objects**.
92
+
93
+ ###Version 2.1.7
94
+
95
+ * Updated `PageObject.populate_data_fields` and `PageSection.populate_data_fields` methods to use backspace characters to delete contents of a textfield
96
+ instead of using `clear`, which was preventing `onchange` JavaScript events from being triggered in some browsers.
97
+
98
+ ###Version 2.1.5
99
+
100
+ * Added `get_min`, `get_max`, and `get_step` methods to `TextField` class.
101
+
102
+ * Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of `min`, `max`, and `step` attributes
103
+ for textfields.
104
+
105
+ ###Version 2.1.4
106
+
107
+ * Added suppression of the Info Bar that displays "Chrome is being controlled by automated test software" on locally hosted instances of the Chrome browser.
108
+
109
+
110
+ ###Version 2.1.3
111
+
112
+ * Added support for "tiling" or cascading multiple browser windows when the `BROWSER_TILE` and `PARALLEL` Environment Variables are set to true. For each
113
+ concurrent parallel thread being executed, the position of each browser will be offset by 100 pixels right and 100 pixels down. For parallel test execution,
114
+ use the [parallel_tests gem](https://rubygems.org/gems/parallel_tests) to decrease overall test execution time.
115
+
116
+ ###Version 2.1.2
117
+
118
+ * Added device profiles for Microsoft Lumia 950, Blackberry Leap, Blackberry Passport, and Kindle Fire HD 10
119
+ * Added ability to set browser language support via the `LOCALE` Environment Variable for local instances of Chrome browsers
120
+
121
+ ###Version 2.1.0
122
+
123
+ * Added device profiles for iPhone 8, iPhone 8 Plus, iPhone X devices running iOS 11
124
+ * Added device profile for iPad Pro 10.5" with iOS 11
125
+ * Updated iPhone 7 and iPhone 7 Plus profiles to iOS 10
126
+ * Updated Google Pixel and Google Pixel XL profiles to Android 8
127
+ * Added device profiles for iPhone 7 (iOS 10) with Mobile Chrome browser and iPad (iOS 10) with Mobile Chrome browser
128
+
129
+
130
+ ## What's Fixed
131
+ ###Version 2.3.8
132
+
133
+ * Fixed locator resolution for **Indexed PageSection Objects**.
134
+
135
+ ###Version 2.3.6.1
136
+
137
+ * `TextField.clear` method now works with most `number` type fields.
138
+
139
+ ###Version 2.3.4
140
+
141
+ * Fixed bug in `PageObject.populate_data_fields` and `PageSection.populate_data_fields` methods that prevented deletion of data in number type textfields
142
+ and textarea controls.
143
+
144
+ ###Version 2.3.3
145
+
146
+ * Corrected device profiles for iPad (iOS 10) with Mobile Chrome browser and iPad (iOS 10) with Mobile Firefox browser.
147
+
148
+ ###Version 2.2.1
149
+
150
+ * `SelectList.choose_option` method now accepts index values for Chosen list objects.
151
+
152
+ ###Version 2.1.9
153
+
154
+ * Fixed bug in `SelectList.choose_option`, `SelectList.get_options`, `SelectList.get_option_count`, and `SelectList.get_selected_option` methods which
155
+ did not recognize grouped option in Chosen list objects.
156
+
157
+ ###Version 2.1.6
158
+
159
+ * Fixed bug in `TestCentricity::WebDriverConnect.set_webdriver_path` method that was failing to set the path to the appropriate chromedriver file for OS X
160
+ and Windows.
161
+
162
+ ###Version 2.1.5
163
+
164
+ * Fixed Chrome and Firefox support for setting browser language via the `LOCALE` Environment Variable. This capability now works for emulated mobile
165
+ browsers hosted in a local instance of Chrome or Firefox.
166
+
167
+ ###Version 2.1.0
168
+
169
+ * The `TestCentricity::WebDriverConnect.initialize_web_driver` method now sets the `Environ` object to the correct device connection states for local and
170
+ cloud hosted browsers.
171
+ * The `TestCentricity::WebDriverConnect.initialize_web_driver` method no longer calls `initialize_browser_size` when running tests against cloud hosted
172
+ mobile web browser, which was resulting in Appium throwing exceptions for unsupported method calls.
173
+ * The `TestCentricity::WebDriverConnect.set_webdriver_path` method now correctly sets the path for Chrome webDrivers when the `HOST_BROWSER` Environment
174
+ Variable is set to `chrome`. Tests against locally hosted emulated mobile web browser running on a local instance of Chrome will now work correctly.
175
+
176
+
177
+ ## Installation
178
+
179
+ Add this line to your automation project's Gemfile:
180
+
181
+ gem 'testcentricity_web'
182
+
183
+ And then execute:
184
+
185
+ $ bundle
186
+
187
+ Or install it yourself as:
188
+
189
+ $ gem install testcentricity_web
190
+
191
+
192
+ ## Setup
193
+ ###Using Cucumber
194
+
195
+ If you are using Cucumber, you need to require the following in your *env.rb* file:
196
+
197
+ require 'capybara'
198
+ require 'capybara/cucumber'
199
+ require 'testcentricity_web'
200
+
201
+
202
+ ###Using RSpec
203
+
204
+ If you are using RSpec instead, you need to require the following in your *env.rb* file:
205
+
206
+ require 'capybara'
207
+ require 'capybara/rspec'
208
+ require 'testcentricity_web'
209
+
210
+
211
+ ### Using Poltergeist
212
+
213
+ If you will be running your tests on a "headless" web browser using Poltergeist and PhantomJS, you must add this line to your automation
214
+ project's Gemfile:
215
+
216
+ gem 'poltergeist'
217
+
218
+
219
+ ### Using Appium
220
+
221
+ If you will be running your tests on mobile Safari browsers on simulated iOS devices using Appium and XCode Simulators, you need to require
222
+ the following in your *env.rb* file:
223
+
224
+ require 'appium_capybara'
225
+
226
+ You also need to add this line to your automation project's Gemfile:
227
+
228
+ gem 'appium_capybara'
229
+
230
+ And then execute:
231
+
232
+ $ bundle
233
+
234
+
235
+
236
+ ## Page Objects
237
+
238
+ The **Page Object Model** is a test automation pattern that aims to create an abstraction of your web app's User Interface that can be used
239
+ in tests. A **Page Object** is an object that represents a single page in your AUT (Application Under Test). **Page Objects** encapsulate the
240
+ implementation details of a web page and expose an API that supports interaction with, and validation of the UI elements on the page.
241
+
242
+ **Page Objects** makes it easier to maintain automated tests because changes to page UI elements are updated in only one location - in the
243
+ **Page Object** class definition. By adopting a **Page Object Model**, Cucumber Feature files and step definitions are no longer required to
244
+ hold specific information about a page's UI objects, thus minimizing maintenance requirements. If any element on a page changes (URL path,
245
+ text field attributes, button captions, etc.), maintenance is performed in the **Page Object** class definition only, typically with no need
246
+ to update the affected feature file, scenarios, or step definitions.
247
+
248
+
249
+ ### Defining a Page Object
250
+
251
+ Your **Page Object** class definitions should be contained within individual `.rb` files in the `features/support/pages` folder of your
252
+ test automation project. You define new **Page Objects** as shown below:
253
+
254
+ class LoginPage < TestCentricity::PageObject
255
+ end
256
+
257
+
258
+ class HomePage < TestCentricity::PageObject
259
+ end
260
+
261
+
262
+ class RegistrationPage < TestCentricity::PageObject
263
+ end
264
+
265
+
266
+ ### Adding Traits to your Page Object
267
+
268
+ Web pages typically have names and URLs associated with them. Web pages also typically have a unique object or attribute that, when present,
269
+ indicates that the page's contents have fully loaded.
270
+
271
+ The `page_name` trait is registered with the **PageManager** object, which includes a `find_page` method that takes a page name as a
272
+ parameter and returns an instance of the associated **Page Object**. If you intend to use the **PageManager**, you must define a `page_name`
273
+ trait for each of the **Page Objects** to be registered.
274
+
275
+ 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.
276
+ `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
277
+ an `Array` of `String` values representing those page names.
278
+
279
+ 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
280
+ when calling the `WebDriverConnect.initialize_web_driver` method, then your `page_url` trait can be the relative URL slug that will
281
+ 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
282
+ via a URL.
283
+
284
+ 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
285
+ `page_locator` trait is a CSS or Xpath expression that uniquely identifies the object or attribute. The `verify_page_exists` method waits
286
+ for the `page_locator` trait to exist.
287
+
288
+ You define your page's **Traits** as shown below:
289
+
290
+ class LoginPage < TestCentricity::PageObject
291
+ trait(:page_name) { 'Login' }
292
+ trait(:page_url) { '/sign_in' }
293
+ trait(:page_locator) { 'body.login-body' }
294
+ end
295
+
296
+
297
+ class HomePage < TestCentricity::PageObject
298
+ # this page may be referred to as 'Home' or 'Dashboard' page so page_name trait is an Array of Strings
299
+ trait(:page_name) { ['Home', 'Dashboard'] }
300
+ trait(:page_url) { '/dashboard' }
301
+ trait(:page_locator) { 'body.dashboard' }
302
+ end
303
+
304
+
305
+ class RegistrationPage < TestCentricity::PageObject
306
+ trait(:page_name) { 'Registration' }
307
+ trait(:page_url) { '/register' }
308
+ trait(:page_locator) { 'body.registration' }
309
+ end
310
+
311
+
312
+ ### Adding UI Elements to your Page Object
313
+
314
+ Web pages are made up of UI elements like text fields, check boxes, combo boxes, radio buttons, tables, lists, buttons, etc.
315
+ **UI Elements** are added to your **Page Object** class definition as shown below:
316
+
317
+ class LoginPage < TestCentricity::PageObject
318
+ trait(:page_name) { 'Login' }
319
+ trait(:page_url) { '/sign_in' }
320
+ trait(:page_locator) { 'body.login-body' }
321
+
322
+ # Login page UI elements
323
+ textfield :user_id_field, 'input#userName'
324
+ textfield :password_field, 'input#password'
325
+ button :login_button, 'button#login'
326
+ checkbox :remember_checkbox, 'input#rememberUser'
327
+ label :error_message_label, 'div#statusBar.login-error'
328
+ end
329
+
330
+
331
+ class RegistrationPage < TestCentricity::PageObject
332
+ trait(:page_name) { 'Registration' }
333
+ trait(:page_url) { '/register' }
334
+ trait(:page_locator) { 'body.registration' }
335
+
336
+ # Registration page UI elements
337
+ textfields first_name_field: 'input#firstName',
338
+ last_name_field: 'input#lastName',
339
+ email_field: 'input#email',
340
+ phone_number_field: 'input#phone',
341
+ address_field: 'input#streetAddress',
342
+ city_field: 'input#city',
343
+ post_code_field: 'input#postalCode',
344
+ password_field: 'input#password',
345
+ pword_confirm_field: 'input#passwordConfirmation'
346
+ selectlists title_select: 'select#title',
347
+ gender_select: 'select#gender',
348
+ state_select: 'select#stateProvince'
349
+ checkbox :email_opt_in_check, 'input#marketingEmailsOptIn'
350
+ button :sign_up_button, 'button#registrationSignUp'
351
+ end
352
+
353
+
354
+ ### Adding Methods to your Page Object
355
+
356
+ It is good practice for your Cucumber step definitions to call high level methods in your your **Page Object** instead of directly accessing
357
+ and interacting with a page object's UI elements. You can add high level methods to your **Page Object** class definition for interacting with
358
+ the UI to hide implementation details, as shown below:
359
+
360
+ class LoginPage < TestCentricity::PageObject
361
+ trait(:page_name) { 'Login' }
362
+ trait(:page_url) { '/sign_in' }
363
+ trait(:page_locator) { 'body.login-body' }
364
+
365
+ # Login page UI elements
366
+ textfield :user_id_field, 'input#userName'
367
+ textfield :password_field, 'input#password'
368
+ button :login_button, 'button#login'
369
+ checkbox :remember_checkbox, 'input#rememberUser'
370
+ label :error_message_label, 'div#statusBar.login-error'
371
+ link :forgot_password_link, 'a.forgotPassword'
372
+
373
+ # log in to web app
374
+ def login(user_id, password)
375
+ user_id_field.set(user_id)
376
+ password_field.set(password)
377
+ login_button.click
378
+ end
379
+
380
+ def remember_me(state)
381
+ remember_checkbox.set_checkbox_state(state)
382
+ end
383
+
384
+ # verify Login page default UI state
385
+ def verify_page_ui
386
+ ui = {
387
+ login_button => { :visible => true, :caption => 'LOGIN' },
388
+ user_id_field => { :visible => true, :enabled => true },
389
+ password_field => { :visible => true, :enabled => true, :value => '', :placeholder => 'Password' },
390
+ remember_checkbox => { :exists => true, :enabled => true, :checked => false },
391
+ forgot_password_link => { :visible => true, :caption => 'Forgot your password?' },
392
+ error_message_label => { :visible => false }
393
+ }
394
+ verify_ui_states(ui)
395
+ super
396
+ end
397
+ end
398
+
399
+
400
+ class RegistrationPage < TestCentricity::PageObject
401
+ trait(:page_name) { 'Registration' }
402
+ trait(:page_url) { '/register' }
403
+ trait(:page_locator) { 'body.registration' }
404
+
405
+ # Registration page UI elements
406
+ textfields first_name_field: 'input#firstName',
407
+ last_name_field: 'input#lastName',
408
+ email_field: 'input#email',
409
+ phone_number_field: 'input#phone',
410
+ address_field: 'input#streetAddress',
411
+ city_field: 'input#city',
412
+ post_code_field: 'input#postalCode',
413
+ password_field: 'input#password',
414
+ pword_confirm_field: 'input#passwordConfirmation'
415
+ selectlists title_select: 'select#title',
416
+ gender_select: 'select#gender',
417
+ state_select: 'select#stateProvince'
418
+ checkbox :email_opt_in_check, 'input#marketingEmailsOptIn'
419
+ button :sign_up_button, 'button#registrationSignUp'
420
+
421
+ # populate Registration page fields with profile data
422
+ def enter_profile_data(profile)
423
+ fields = { title_select => profile.title,
424
+ first_name_field => profile.first_name,
425
+ last_name_field => profile.last_name,
426
+ gender_select => profile.gender,
427
+ phone_number_field => profile.phone,
428
+ email_field => profile.email,
429
+ address_field => profile.address,
430
+ city_field => profile.city,
431
+ state_select => profile.state,
432
+ post_code_field => profile.postal_code,
433
+ password_field => profile.password,
434
+ pword_confirm_field => profile.confirm_password
435
+ }
436
+ populate_data_fields(fields)
437
+ sign_up_button.click
438
+ end
439
+ end
440
+
441
+
442
+
443
+ Once your **Page Objects** have been instantiated, you can call your methods as shown below:
444
+
445
+ login_page.remember_me(true)
446
+ login_page.user_id_field.set('snicklefritz', 'Pa55w0rd')
447
+
448
+
449
+
450
+ ## PageSection Objects
451
+
452
+ A **PageSection Object** is a collection of **UI Elements** that may appear in multiple locations on a page, or on multiple pages in a web
453
+ app. It is a collection of **UI Elements** that represent a conceptual area of functionality, like a navigation bar, a search capability,
454
+ or a menu. **UI Elements** and functional behavior are confined to the scope of a **PageSection Object**.
455
+
456
+ A **PageSection Object** may contain other **PageSection Objects**.
457
+
458
+
459
+ ### Defining a PageSection Object
460
+
461
+ Your **PageSection** class definitions should be contained within individual `.rb` files in the `features/support/sections` folder of
462
+ your test automation project. You define new **PageSection Objects** as shown below:
463
+
464
+ class SearchForm < TestCentricity::PageSection
465
+ end
466
+
467
+
468
+ ### Adding Traits to a PageSection Object
469
+
470
+ A **PageSection Object** typically has a root node object that encapsulates a collection of **UI Elements**. The `section_locator` trait
471
+ specifies the CSS or Xpath expression that uniquely identifies that root node object.
472
+
473
+ You define your page section's **Traits** as shown below:
474
+
475
+ class SearchForm < TestCentricity::PageSection
476
+ trait(:section_locator) { 'form#gnav-search' }
477
+ trait(:section_name) { 'Search widget' }
478
+ end
479
+
480
+
481
+ ### Adding UI Elements to your PageSection Object
482
+
483
+ Page sections are typically made up of UI elements like text fields, check boxes, combo boxes, radio buttons, tables, lists, buttons, etc.
484
+ **UI Elements** are added to your **PageSection** class definition as shown below:
485
+
486
+ class SearchForm < TestCentricity::PageSection
487
+ trait(:section_locator) { 'form#gnav-search' }
488
+ trait(:section_name) { 'Search widget' }
489
+
490
+ # Search Form UI elements
491
+ textfield :search_field, 'input#search-query'
492
+ button :search_button, 'button[type=submit]'
493
+ end
494
+
495
+
496
+ ### Adding Methods to your PageSection Object
497
+
498
+ You can add high level methods to your **PageSection** class definition, as shown below:
499
+
500
+ class SearchForm < TestCentricity::PageSection
501
+ trait(:section_locator) { 'form#gnav-search' }
502
+ trait(:section_name) { 'Search widget' }
503
+
504
+ # Search Form UI elements
505
+ textfield :search_field, 'input#search-query'
506
+ button :search_button, 'button[type=submit]'
507
+
508
+ def search_for(value)
509
+ search_field.set(value)
510
+ search_button.click
511
+ end
512
+ end
513
+
514
+
515
+ ### Adding PageSection Objects to your Page Object
516
+
517
+ You add a **PageSection Object** to its associated **Page Object** as shown below:
518
+
519
+ class HomePage < TestCentricity::PageObject
520
+ trait(:page_name) { 'Home' }
521
+ trait(:page_url) { '/dashboard' }
522
+ trait(:page_locator) { 'body.dashboard' }
523
+
524
+ # Home page Section Objects
525
+ section :search_form, SearchForm
526
+ end
527
+
528
+ Once your **Page Object** has been instantiated, you can call its **PageSection** methods as shown below:
529
+
530
+ home_page.search_form.search_for('ocarina')
531
+
532
+
533
+
534
+ ## UI Elements
535
+
536
+ **Page Objects** and **PageSection Objects** are typically made up of **UI Element** like text fields, check boxes, combo boxes, radio buttons,
537
+ tables, lists, buttons, etc. **UI Elements** are declared and instantiated within the class definition of the **Page Object** or **PageSection
538
+ Object** in which they are contained. With TestCentricity Web, all UI elements are based on the **UIElement** class.
539
+
540
+
541
+ ### Declaring and Instantiating UI Element
542
+
543
+ Single **UIElement** declarations have the following format:
544
+
545
+ elementType :element Name, locator
546
+
547
+ * The `element name` is the unique name that you will use to refer to the UI element and is specified as a symbol.
548
+ * The `locator` is the CSS or XPath attribute that uniquely and unambiguously identifies the UI element.
549
+
550
+ Multiple **UIElement** declarations for a collection of elements of the same type can be performed by passing a hash table containing the
551
+ names and locators of each individual element.
552
+
553
+ ### Example UI Element Declarations
554
+
555
+ Supported **UI Element** elementTypes and their declarations have the following format:
556
+
557
+ *Single element declarations:*
558
+
559
+ class SamplePage < TestCentricity::PageObject
560
+
561
+ button :button_name, locator
562
+ textfield :field_name, locator
563
+ checkbox :checkbox_name, locator
564
+ radio :radio_button_name, locator
565
+ label :label_name, locator
566
+ link :link_name, locator
567
+ selectlist :select_name, locator
568
+ list :list_name, locator
569
+ table :table_name, locator
570
+ image :image_name, locator
571
+ filefield :filefield_name, locator
572
+
573
+ end
574
+
575
+ *Multiple element declarations:*
576
+
577
+ class SamplePage < TestCentricity::PageObject
578
+
579
+ buttons button_1_name: locator,
580
+ button_2_name: locator,
581
+ button_X_name: locator
582
+ textfields field_1_name: locator,
583
+ field_2_name: locator,
584
+ field_X_name: locator
585
+ checkboxes check_1_name: locator,
586
+ check_2_name: locator,
587
+ check_X_name: locator
588
+ radios radio_1_name: locator,
589
+ radio_X_name: locator
590
+ labels label_1_name: locator,
591
+ label_X_name: locator
592
+ links link_1_name: locator,
593
+ link_X_name: locator
594
+ selectlists selectlist_1_name: locator,
595
+ selectlist_X_name: locator
596
+ lists list_1_name: locator,
597
+ list_X_name: locator
598
+ tables table_1_name: locator,
599
+ table_X_name: locator
600
+ images image_1_name: locator,
601
+ image_X_name: locator
602
+ filefields filefield_1_name: locator,
603
+ filefield_X_name: locator
604
+
605
+ end
606
+
607
+
608
+ Refer to the Class List documentation for the **PageObject** and **PageSection** classes for details on the class methods used for declaring
609
+ and instantiating **UI Elements**. Examples of UI element declarations can be found in the ***Adding UI Elements to your Page Object*** and
610
+ ***Adding UI Elements to your PageSection Object*** sections above.
611
+
612
+
613
+ ### UIElement Inherited Methods
614
+
615
+ With TestCentricity, all UI elements are based on the **UIElement** class, and inherit the following methods:
616
+
617
+ **Action methods:**
618
+
619
+ element.click
620
+ element.double_click
621
+ element.right_click
622
+ element.click_at(x, y)
623
+ element.hover
624
+ element.drag_by(right_offset, down_offset)
625
+ element.drag_and_drop(target, right_offset, down_offset)
626
+
627
+ **Object state methods:**
628
+
629
+ element.exists?
630
+ element.visible?
631
+ element.hidden?
632
+ element.enabled?
633
+ element.disabled?
634
+ element.displayed?
635
+ element.get_value
636
+ element.width
637
+ element.height
638
+ element.x
639
+ element.y
640
+ element.get_attribute(attrib)
641
+ element.get_native_attribute(attrib)
642
+
643
+ **Waiting methods:**
644
+
645
+ element.wait_until_exists(seconds)
646
+ element.wait_until_gone(seconds)
647
+ element.wait_until_visible(seconds)
648
+ element.wait_until_hidden(seconds)
649
+ element.wait_until_value_is(value, seconds)
650
+ element.wait_until_value_changes(seconds)
651
+
652
+
653
+ ## Instantiating your Page Objects
654
+
655
+ Before you can call the methods in your **Page Objects** and **PageSection Objects**, you must instantiate the **Page Objects** of your
656
+ web application, as well as create instance variables which can be used when calling a **Page Objects** methods from your step definitions.
657
+ There are several ways to instantiate your **Page Objects**.
658
+
659
+ One common implementation is shown below:
660
+
661
+ module WorldPages
662
+ def login_page
663
+ @login_page ||= LoginPage.new
664
+ end
665
+
666
+ def home_page
667
+ @home_page ||= HomePage.new
668
+ end
669
+
670
+ def registration_page
671
+ @registration_page ||= RegistrationPage.new
672
+ end
673
+
674
+ def search_results_page
675
+ @search_results_page ||= SearchResultsPage.new
676
+ end
677
+ end
678
+
679
+ World(WorldPages)
680
+
681
+ The `WorldPages` module above can be defined in your `env.rb` file, or you can define it in a separate `world_pages.rb` file in the
682
+ `features/support` folder.
683
+
684
+ While this approach is effective for small web applications with only a few pages (and hence few **Page Objects**), it quickly becomes
685
+ cumbersome to manage if your web application has dozens of **Page Objects** that need to be instantiated and managed.
686
+
687
+ ### Using the PageManager
688
+
689
+ The **PageManager** class provides methods for supporting the instantiation and management of **Page Objects**. In the code example below,
690
+ the `page_objects` method contains a hash table of your **Page Object** instances and their associated **Page Object** class names
691
+ to be instantiated by **PageManager**:
692
+
693
+ module WorldPages
694
+ def page_objects
695
+ { :login_page => LoginPage,
696
+ :home_page => HomePage,
697
+ :registration_page => RegistrationPage,
698
+ :search_results_page => SearchResultsPage,
699
+ :products_grid_page => ProductsCollectionPage,
700
+ :product_detail_page => ProductDetailPage,
701
+ :shopping_basket_page => ShoppingBasketPage,
702
+ :payment_method_page => PaymentMethodPage,
703
+ :confirm_purchase_page => PurchaseConfirmationPage,
704
+ :my_account_page => MyAccountPage,
705
+ :my_order_history_page => MyOrderHistoryPage,
706
+ :my_ship_to_addresses_page => MyShipToAddressesPage,
707
+ :terms_conditions_page => TermsConditionsPage,
708
+ :privacy_policy_page => PrivacyPolicyPage,
709
+ :faqs_page => FAQsPage,
710
+ :contact_us_page => ContactUsPage
711
+ }
712
+ end
713
+ end
714
+
715
+ World(WorldPages)
716
+
717
+ The `WorldPages` module above should be defined in the `world_pages.rb` file in the `features/support` folder.
718
+
719
+ Include the code below in your `env.rb` file to ensure that your **Page Objects** are instantiated before your Cucumber scenarios are
720
+ executed:
721
+
722
+ include WorldPages
723
+ WorldPages.instantiate_page_objects
724
+
725
+ **NOTE:** If you intend to use the **PageManager**, you must define a `page_name` trait for each of the **Page Objects** to be registered.
726
+
727
+
728
+ ### Leveraging the PageManager in your Cucumber tests
729
+
730
+ Many Cucumber based automated tests suites include scenarios that verify that web pages are correctly loaded, displayed, or can be
731
+ navigated to by clicking associated links. One such Cucumber navigation scenario is displayed below:
732
+
733
+ Scenario Outline: Verify Home page navigation links
734
+ Given I am on the Home page
735
+ When I click the <page> navigation link
736
+ Then I expect the <page> page to be correctly displayed
737
+
738
+ Examples:
739
+ |page |
740
+ |Registration |
741
+ |My Account |
742
+ |Terms & Conditions |
743
+ |Privacy Policy |
744
+ |FAQs |
745
+ |Contact Us |
746
+
747
+ In the above example, the step definitions associated with the 3 steps might be implemented using a page_dispatcher method using a
748
+ `case` statement to parse the `page` parameter as in the example below:
749
+
750
+ Given(/^I am on the ([^\"]*) page$/) do |page_name|
751
+ target_page = page_dispatcher(page_name)
752
+ target_page.load_page
753
+ end
754
+
755
+ When(/^I click the ([^\"]*) navigation link$/) do |link_name|
756
+ target_page = page_dispatcher(link_name)
757
+ target_page.navigate_to
758
+ end
759
+
760
+ Then(/^I expect the ([^\"]*) page to be correctly displayed$/) do |page_name|
761
+ target_page = page_dispatcher(page_name)
762
+ target_page.verify_page_exists
763
+ target_page.verify_page_ui
764
+ end
765
+
766
+ # this method takes a page name as a parameter and returns an instance of the associated Page Object
767
+ def page_dispatcher(page_name)
768
+ case page_name
769
+ when 'Registration'
770
+ page = registration_page
771
+ when 'My Account'
772
+ page = my_account_page
773
+ when 'Terms & Conditions'
774
+ page = terms_conditions_page
775
+ when 'Privacy Policy'
776
+ page = privacy_policy_page
777
+ when 'Contact Us'
778
+ page = contact_us_page
779
+ when 'FAQs'
780
+ page = faqs_page
781
+ end
782
+ raise "No page object defined for page named '#{page_name}'" unless page
783
+ page
784
+ end
785
+
786
+
787
+ While this approach may be effective for small web applications with only a few pages (and hence few **Page Objects**), it quickly becomes
788
+ cumbersome to manage if your web application has dozens of **Page Objects** that need to be managed.
789
+
790
+ The **PageManager** class provides a `find_page` method that replaces the cumbersome and difficult to maintain `case` statement used in the
791
+ above example. The **PageManager** `current_page` method allows you to set or get an instance of the currently active Page Object.
792
+
793
+ To use these **PageManager** methods, include the step definitions and code below in a `page_steps.rb` or `generic_steps.rb` file in the
794
+ `features/step_definitions` folder:
795
+
796
+ include TestCentricity
797
+
798
+ Given(/^I am on the ([^\"]*) page$/) do |page_name|
799
+ target_page = page_dispatcher(page_name)
800
+ target_page.load_page if target_page
801
+ # let PageManager store an instance of the current page object
802
+ PageManager.current_page = target_page
803
+ end
804
+
805
+ When(/^I click the ([^\"]*) navigation link$/) do |link_name|
806
+ target_page = page_dispatcher(link_name)
807
+ target_page.navigate_to if target_page
808
+ end
809
+
810
+ Then(/^I expect to see the ([^\"]*) page$/) do |page_name|
811
+ target_page = page_dispatcher(page_name)
812
+ target_page.verify_page_exists if target_page
813
+ # let PageManager store an instance of the current page object
814
+ PageManager.current_page = target_page
815
+ end
816
+
817
+ Then(/^I expect the ([^\"]*) page to be correctly displayed$/) do |page_name|
818
+ target_page = page_dispatcher(page_name)
819
+ target_page.verify_page_exists
820
+ target_page.verify_page_ui
821
+ # let PageManager store an instance of the current page object
822
+ PageManager.current_page = target_page
823
+ end
824
+
825
+ # this method takes a page name as a parameter and returns an instance of the associated Page Object
826
+ def page_dispatcher(page_name)
827
+ page = PageManager.find_page(page_name)
828
+ raise "No page object defined for page named '#{page_name}'" unless page
829
+ page
830
+ end
831
+
832
+
833
+
834
+ ## Connecting to a Web Browser
835
+
836
+ The `TestCentricity::WebDriverConnect.initialize_web_driver` method configures the appropriate selenium-webdriver capabilities required to establish a
837
+ connection with a target web browser, and sets the base host URL of the web site you are running your tests against.
838
+
839
+ The `TestCentricity::WebDriverConnect.initialize_web_driver` method accepts a single optional parameter - the base host URL. Cucumber **Environment
840
+ Variables** are used to specify the target local or remote web browser, and the various webdriver capability parameters required to configure
841
+ the connection.
842
+
843
+
844
+ ### Locally hosted desktop web browser
845
+
846
+ For locally hosted desktop web browsers running on macOS (OS X) or Windows platforms, the `WEB_BROWSER` Environment Variable must be set to one of the
847
+ values from the table below:
848
+
849
+ `WEB_BROWSER` | **Desktop Platform**
850
+ --------------|----------------
851
+ `firefox` | macOS (OS X) or Windows
852
+ `chrome` | macOS (OS X) or Windows
853
+ `safari` | macOS (OS X) only
854
+ `ie` | Windows only
855
+ `poltergeist` | macOS (OS X) or Windows
856
+
857
+ To set the size of a desktop browser window, you set the `BROWSER_SIZE` Environment Variable to the desired width and height in pixels as shown below:
858
+
859
+ BROWSER_SIZE=1600,1000
860
+
861
+ To maximize a desktop browser window, you set the `BROWSER_SIZE` Environment Variable to 'max' as shown below:
862
+
863
+ BROWSER_SIZE=max
864
+
865
+
866
+ ### Locally hosted emulated mobile web browser
867
+
868
+ You can run your tests against mobile device browsers that are emulated within a locally hosted instance of a Chrome desktop browser on OS X or
869
+ Windows. The specified mobile browser's user agent, CSS screen dimensions, and default screen orientation will be automatically set within the
870
+ local Chrome browser instance. You may even specify the emulated device's screen orientation. For locally hosted emulated mobile web browsers,
871
+ the `WEB_BROWSER` Environment Variable must be set to one of the values from the table below:
872
+
873
+ `WEB_BROWSER` | `HOST_BROWSER` | **CSS Screen Dimensions** | **Default Orientation** | **OS Version**
874
+ ----------------------|----------------------|-----------|----------|---------
875
+ `ipad` |`chrome` |1024 x 768 |landscape |iOS 10
876
+ `ipad_pro` |`chrome` |1366 x 1024|landscape |iOS 11
877
+ `ipad_pro_10_5` |`chrome` |1112 x 834 |landscape |iOS 11
878
+ `ipad_chrome` |`chrome` |1024 x 768 |landscape |iOS 10 - Mobile Chrome browser for iOS
879
+ `ipad_firefox` |`chrome` |1024 x 768 |landscape |iOS 10 - Mobile Firefox browser for iOS
880
+ `android_tablet` |`chrome` |1024 x 768 |landscape |Android 3.0
881
+ `kindle_fire` |`chrome` |1024 x 600 |landscape |
882
+ `kindle_firehd7` |`chrome` |800 x 480 |landscape |Fire OS 3
883
+ `kindle_firehd8` |`chrome` |1280 x 800 |landscape |Fire OS 5
884
+ `kindle_firehd10` |`chrome` |1920 x 1200 |landscape |Fire OS 5
885
+ `surface` |`chrome` |1366 x 768 |landscape |
886
+ `blackberry_playbook` |`chrome` |1024 x 600 |landscape |BlackBerry Tablet OS
887
+ `samsung_galaxy_tab` |`chrome` |1280 x 800 |landscape |Android 4.0.4
888
+ `google_nexus7` |`chrome` |960 x 600 |landscape |Android 4.4.4
889
+ `google_nexus9` |`chrome` |1024 x 768 |landscape |Android 5.1
890
+ `google_nexus10` |`chrome` |1280 x 800 |landscape |Android 5.1
891
+ `iphone` |`chrome` |320 x 480 |portrait |iOS 9.1
892
+ `iphone4` |`chrome` |320 x 480 |portrait |iOS 9.1
893
+ `iphone5` |`chrome` |320 x 568 |portrait |iOS 9.1
894
+ `iphone6` |`chrome` |375 x 667 |portrait |iOS 9.1
895
+ `iphone6_plus` |`chrome` |414 x 736 |portrait |iOS 9.1
896
+ `iphone7` |`chrome` |375 x 667 |portrait |iOS 10
897
+ `iphone7_plus` |`chrome` |414 x 736 |portrait |iOS 10
898
+ `iphone7_chrome` |`chrome` |375 x 667 |portrait |iOS 10 - Mobile Chrome browser for iOS
899
+ `iphone7_firefox` |`chrome` |375 x 667 |portrait |iOS 10 - Mobile Firefox browser for iOS
900
+ `iphone7_edge` |`chrome` |375 x 667 |portrait |iOS 10 - Microsoft Edge browser for iOS
901
+ `iphone8` |`chrome` |375 x 667 |portrait |iOS 11
902
+ `iphone8_plus` |`chrome` |414 x 736 |portrait |iOS 11
903
+ `iphonex` |`chrome` |375 x 812 |portrait |iOS 11
904
+ `android_phone` |`chrome` |320 x 480 |portrait |Android 4
905
+ `nexus6` |`chrome` |411 x 731 |portrait |Android 6
906
+ `pixel` |`chrome` |411 x 731 |portrait |Android 8
907
+ `pixel_xl` |`chrome` |411 x 731 |portrait |Android 8
908
+ `samsung_galaxy_s4` |`chrome` |360 x 640 |portrait |Android 5.0.1
909
+ `samsung_galaxy_s5` |`chrome` |360 x 640 |portrait |Android 6.0.1
910
+ `samsung_galaxy_s6` |`chrome` |360 x 640 |portrait |Android 6.0.1
911
+ `windows_phone7` |`chrome` |320 x 480 |portrait |Windows Phone OS 7.5
912
+ `windows_phone8` |`chrome` |320 x 480 |portrait |Windows Phone OS 8.0
913
+ `lumia_950_xl` |`chrome` |360 x 640 |portrait |Windows Phone OS 10
914
+ `blackberry_z10` |`chrome` |384 x 640 |portrait |BlackBerry 10 OS
915
+ `blackberry_z30` |`chrome` |360 x 640 |portrait |BlackBerry 10 OS
916
+ `blackberry_leap` |`chrome` |360 x 640 |portrait |BlackBerry 10 OS
917
+ `blackberry_passport` |`chrome` |504 x 504 |square |BlackBerry 10 OS
918
+
919
+ To change the emulated device's screen orientation from the default setting, set the `ORIENTATION` Environment Variable to either `portrait` or `landscape`.
920
+
921
+ To use a local instance of the Chrome desktop browser to host the emulated mobile web browser, you must set the `HOST_BROWSER` Environment Variable
922
+ to `chrome`.
923
+
924
+
925
+ ### Mobile Safari browser on iOS Simulators or iOS Physical Devices
926
+
927
+ 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
928
+ OS X. You must install Appium, XCode, and the iOS version-specific device simulators for XCode. You must also ensure that the `appium_capybara` gem is
929
+ installed and required as described in **section 2.4 (Setup - Using Appium)** above.
930
+
931
+ 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).
932
+ The Appium server must be running prior to invoking Cucumber to run your features/scenarios.
933
+
934
+ Once your test environment is properly configured, the following **Environment Variables** must be set as described in the table below.
935
+
936
+ **Environment Variable** | **Description**
937
+ --------------- | ----------------
938
+ `WEB_BROWSER` | Must be set to `appium`
939
+ `APP_PLATFORM_NAME` | Must be set to `iOS`
940
+ `APP_BROWSER` | Must be set to `Safari`
941
+ `APP_VERSION` | Must be set to `11.2`, `10.3`, `9.3`, or which ever iOS version you wish to run within the XCode Simulator
942
+ `APP_DEVICE` | Set to iOS device name supported by the iOS Simulator (`iPhone 6s Plus`, `iPad Pro (10.5-inch)`, `iPad Air 2`, etc.) or name of physically connected iOS device
943
+ `DEVICE_TYPE` | Must be set to `phone` or `tablet`
944
+ `APP_UDID` | UDID of physically connected iOS device (not used for simulators)
945
+ `TEAM_ID` | unique 10-character Apple developer team identifier string (not used for simulators)
946
+ `TEAM_NAME` | String representing a signing certificate (not used for simulators)
947
+ `APP_ALLOW_POPUPS` | [Optional] Allow javascript to open new windows in Safari. Set to `true` or `false`
948
+ `APP_IGNORE_FRAUD_WARNING` | [Optional] Prevent Safari from showing a fraudulent website warning. Set to `true` or `false`
949
+ `APP_NO_RESET` | [Optional] Don't reset app state after each test. Set to `true` or `false`
950
+ `APP_INITIAL_URL` | [Optional] Initial URL, default is a local welcome page. e.g. `http://www.apple.com`
951
+ `LOCALE` | [Optional] Locale to set for the simulator. e.g. `fr_CA`
952
+ `LANGUAGE` | [Optional] Language to set for the simulator. e.g. `fr`
953
+ `ORIENTATION` | [Optional] Set to `portrait` or `landscape` (only for iOS simulators)
954
+
955
+
956
+ ### Mobile Chrome or Android browsers on Android Studio Virtual Device emulators
957
+
958
+ You can run your mobile web tests against the mobile Chrome or Android browser on emulated Android devices using Appium and Android Studio on OS X. You
959
+ must install Android Studio, the desired Android version-specific virtual device emulators, and Appium. Refer to [this page](https://github.com/appium/ruby_console/blob/master/osx.md)
960
+ 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
961
+ described in **section 2.4 (Setup - Using Appium)** above.
962
+
963
+ 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)
964
+ for information on configuring Appium to use the correct version of Chromedriver required to work with the web browser supported by each Android OS version.
965
+
966
+ Once your test environment is properly configured, the following **Environment Variables** must be set as described in the table below.
967
+
968
+ **Environment Variable** | **Description**
969
+ --------------- | ----------------
970
+ `WEB_BROWSER` | Must be set to `appium`
971
+ `APP_PLATFORM_NAME` | Must be set to `Android`
972
+ `APP_BROWSER` | Must be set to `Chrome` or `Browser`
973
+ `APP_VERSION` | Must be set to `8.0`, `7.0`, or which ever Android OS version you wish to run with the Android Virtual Device
974
+ `APP_DEVICE` | Set to Android Virtual Device ID (`Pixel_2_XL_API_26`, `Nexus_6_API_23`, etc.) found in Advanced Settings of AVD Configuration
975
+ `DEVICE_TYPE` | Must be set to `phone` or `tablet`
976
+ `ORIENTATION` | [Optional] Set to `portrait` or `landscape`
977
+ `APP_INITIAL_URL` | [Optional] Initial URL, default is a local welcome page. e.g. `http://www.apple.com`
978
+ `LOCALE` | [Optional] Locale to set for the simulator. e.g. `fr_CA`
979
+ `LANGUAGE` | [Optional] Language to set for the simulator. e.g. `fr`
980
+
981
+
982
+ ### Remotely hosted desktop and mobile web browsers
983
+
984
+ You can run your automated tests against remotely hosted desktop and mobile web browsers using the BrowserStack, CrossBrowserTesting,
985
+ Sauce Labs, or TestingBot services. If your tests are running against a web site hosted on your local computer (`localhost`), or on a
986
+ staging server inside your LAN, you must set the `TUNNELING` Environment Variable to `true`.
987
+
988
+
989
+ #### Remote desktop browsers on the BrowserStack service
990
+
991
+ For remotely hosted desktop web browsers on the BrowserStack service, the following **Environment Variables** must be set as described in
992
+ the table below. Refer to the [Browserstack-specific capabilities chart page](https://www.browserstack.com/automate/capabilities#capabilities-browserstack)
993
+ for information regarding the specific capabilities.
994
+
995
+ **Environment Variable** | **Description**
996
+ --------------- | ----------------
997
+ `WEB_BROWSER` | Must be set to `browserstack`
998
+ `BS_USERNAME` | Must be set to your BrowserStack account user name
999
+ `BS_AUTHKEY` | Must be set to your BrowserStack account access key
1000
+ `BS_OS` | Must be set to `OS X` or `Windows`
1001
+ `BS_OS_VERSION` | Refer to `os_version` capability in chart
1002
+ `BS_BROWSER` | Refer to `browser` capability in chart
1003
+ `BS_VERSION` | [Optional] Refer to `browser_version` capability in chart. If not specified, latest stable version of browser will be used.
1004
+ `TUNNELING` | Must be `true` if you are testing against internal/local servers (`true` or `false`). If `true`, the BrowserStack Local instance will be automatically started.
1005
+ `RESOLUTION` | [Optional] Refer to supported screen `resolution` capability in chart
1006
+ `BROWSER_SIZE` | [Optional] Specify width, height of browser window
1007
+ `RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`)
1008
+ `TIME_ZONE` | [Optional] Specify custom time zone. Refer to `browserstack.timezone` capability in chart
1009
+
1010
+ If the BrowserStack Local instance is running (`TUNNELING` Environment Variable is `true`), call the`TestCentricity::WebDriverConnect.close_tunnel` method
1011
+ upon completion of your test suite to stop the Local instance. Place the code shown below in your `env.rb` file.
1012
+
1013
+ # Code to stop BrowserStack Local instance after end of test (if tunneling is enabled)
1014
+ at_exit do
1015
+ TestCentricity::WebDriverConnect.close_tunnel if Environ.tunneling
1016
+ end
1017
+
1018
+
1019
+ #### Remote mobile browsers on the BrowserStack service
1020
+
1021
+ For remotely hosted mobile web browsers on the BrowserStack service, the following **Environment Variables** must be set as described in
1022
+ the table below. Refer to the [Browserstack-specific capabilities chart page](https://www.browserstack.com/automate/capabilities#capabilities-browserstack)
1023
+ for information regarding the specific capabilities.
1024
+
1025
+ **Environment Variable** | **Description**
1026
+ --------------- | ----------------
1027
+ `WEB_BROWSER` | Must be set to `browserstack`
1028
+ `BS_USERNAME` | Must be set to your BrowserStack account user name
1029
+ `BS_AUTHKEY` | Must be set to your BrowserStack account access key
1030
+ `BS_OS` | Must be set to `ios` or `android`
1031
+ `BS_BROWSER` | Must be set to `iPhone`, `iPad`, or `android`
1032
+ `BS_PLATFORM` | Must be set to `MAC` (for iOS) or `ANDROID`
1033
+ `BS_DEVICE` | Refer to `device` capability in chart
1034
+ `BS_REAL_MOBILE` | Set to `true` if running against a real device
1035
+ `DEVICE_TYPE` | Must be set to `phone` or `tablet`
1036
+ `TUNNELING` | Must be `true` if you are testing against internal/local servers (`true` or `false`). If `true`, the BrowserStack Local instance will be automatically started.
1037
+ `ORIENTATION` | [Optional] Set to `portrait` or `landscape`
1038
+ `RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`)
1039
+ `TIME_ZONE` | [Optional] Specify custom time zone. Refer to `browserstack.timezone` capability in chart
1040
+
1041
+
1042
+
1043
+ #### Remote desktop browsers on the CrossBrowserTesting service
1044
+
1045
+ For remotely hosted desktop web browsers on the CrossBrowserTesting service, the following **Environment Variables** must be set as described in
1046
+ the table below. Use the Configuration Wizard on the [Start a Selenium Test page](https://app.crossbrowsertesting.com/selenium/run) to obtain
1047
+ information regarding the specific capabilities.
1048
+
1049
+ **Environment Variable** | **Description**
1050
+ --------------- | ----------------
1051
+ `WEB_BROWSER` | Must be set to `crossbrowser`
1052
+ `CB_USERNAME` | Must be set to your CrossBrowserTesting account user name or email address
1053
+ `CB_AUTHKEY` | Must be set to your CrossBrowserTesting account access key
1054
+ `CB_OS` | Refer to `os_api_name` capability in the sample script of the Wizard
1055
+ `CB_BROWSER` | Refer to `browser_api_name` capability in the sample script of the Wizard
1056
+ `RESOLUTION` | [Optional] Refer to supported `screen_resolution` capability in the sample script of the Wizard
1057
+ `BROWSER_SIZE` | [Optional] Specify width, height of browser window
1058
+ `RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`)
1059
+
1060
+
1061
+ #### Remote mobile browsers on the CrossBrowserTesting service
1062
+
1063
+ For remotely hosted mobile web browsers on the CrossBrowserTesting service, the following **Environment Variables** must be set as described in
1064
+ the table below. Use the Configuration Wizard on the [Start a Selenium Test page](https://app.crossbrowsertesting.com/selenium/run) to obtain
1065
+ information regarding the specific capabilities.
1066
+
1067
+ **Environment Variable** | **Description**
1068
+ --------------- | ----------------
1069
+ `WEB_BROWSER` | Must be set to `crossbrowser`
1070
+ `CB_USERNAME` | Must be set to your CrossBrowserTesting account user name or email address
1071
+ `CB_AUTHKEY` | Must be set to your CrossBrowserTesting account access key
1072
+ `CB_PLATFORM` | Refer to `os_api_name` capability in the sample script of the Wizard
1073
+ `CB_BROWSER` | Refer to `browser_api_name` capability in the sample script of the Wizard
1074
+ `RESOLUTION` | Refer to supported `screen_resolution` capability in the sample script of the Wizard
1075
+ `DEVICE_TYPE` | Must be set to `phone` or `tablet`
1076
+ `RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`)
1077
+
1078
+
1079
+
1080
+ #### Remote desktop browsers on the Sauce Labs service
1081
+
1082
+ For remotely hosted desktop web browsers on the Sauce Labs service, the following **Environment Variables** must be set as described in
1083
+ the table below. Use the Selenium API on the [Platform Configurator page](https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/) to obtain
1084
+ information regarding the specific capabilities.
1085
+
1086
+ **Environment Variable** | **Description**
1087
+ --------------- | ----------------
1088
+ `WEB_BROWSER` | Must be set to `saucelabs`
1089
+ `SL_USERNAME` | Must be set to your Sauce Labs account user name or email address
1090
+ `SL_AUTHKEY` | Must be set to your Sauce Labs account access key
1091
+ `SL_OS` | Refer to `platform` capability in the Copy Code section of the Platform Configurator page
1092
+ `SL_BROWSER` | Must be set to `chrome`, `firefox`, `safari`, `internet explorer`, or `edge`
1093
+ `SL_VERSION` | Refer to `version` capability in the Copy Code section of the Platform Configurator page
1094
+ `RESOLUTION` | [Optional] Refer to supported `screenResolution` capability in the Copy Code section of the Platform Configurator page
1095
+ `BROWSER_SIZE `| [Optional] Specify width, height of browser window
1096
+ `RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`)
1097
+
1098
+
1099
+ #### Remote desktop browsers on the TestingBot service
1100
+
1101
+ For remotely hosted desktop web browsers on the TestingBot service, the following **Environment Variables** must be set as described in
1102
+ the table below. Refer to the [TestingBot List of Available Browsers page](https://testingbot.com/support/getting-started/browsers.html) for information
1103
+ regarding the specific capabilities.
1104
+
1105
+ **Environment Variable** | **Description**
1106
+ --------------- | ----------------
1107
+ `WEB_BROWSER` | Must be set to `testingbot`
1108
+ `TB_USERNAME` | Must be set to your TestingBot account user name
1109
+ `TB_AUTHKEY` | Must be set to your TestingBot account access key
1110
+ `TB_OS` | Refer to `platform` capability in chart
1111
+ `TB_BROWSER` | Refer to `browserName` capability in chart
1112
+ `TB_VERSION` | Refer to `version` capability in chart
1113
+ `TUNNELING` | Must be `true` if you are testing against internal/local servers (`true` or `false`)
1114
+ `RESOLUTION` | [Optional] Possible values: `800x600`, `1024x768`, `1280x960`, `1280x1024`, `1600x1200`, `1920x1200`, `2560x1440`
1115
+ `BROWSER_SIZE`| [Optional] Specify width, height of browser window
1116
+
1117
+
1118
+ #### Remote mobile browsers on the TestingBot service
1119
+
1120
+ For remotely hosted mobile web browsers on the TestingBot service, the following **Environment Variables** must be set as described in
1121
+ the table below. Refer to the [TestingBot List of Available Browsers page](https://testingbot.com/support/getting-started/browsers.html) for information
1122
+ regarding the specific capabilities.
1123
+
1124
+ **Environment Variable** | **Description**
1125
+ --------------- | ----------------
1126
+ `WEB_BROWSER` | Must be set to `testingbot`
1127
+ `TB_USERNAME` | Must be set to your TestingBot account user name
1128
+ `TB_AUTHKEY` | Must be set to your TestingBot account access key
1129
+ `TB_OS` | Must be set to `MAC` (for iOS) or `ANDROID`
1130
+ `TB_BROWSER` | Must be set to `safari` (for iOS) or `browser` (for Android)
1131
+ `TB_VERSION` | Refer to `version` capability in chart
1132
+ `TB_PLATFORM` | Must be set to `iOS` or `ANDROID`
1133
+ `TB_DEVICE` | Refer to `deviceName` capability in chart
1134
+ `DEVICE_TYPE` | Must be set to `phone` or `tablet`
1135
+ `TUNNELING` | Must be `true` if you are testing against internal/local servers (`true` or `false`)
1136
+ `ORIENTATION` | [Optional] Set to `portrait` or `landscape`
1137
+
1138
+
1139
+ ### Using Browser specific Profiles in cucumber.yml
1140
+
1141
+ While you can set **Environment Variables** in the command line when invoking Cucumber, a preferred method of specifying and managing
1142
+ target web browsers is to create browser specific **Profiles** that set the appropriate **Environment Variables** for each target browser
1143
+ in your `cucumber.yml` file.
1144
+
1145
+ Below is a list of Cucumber **Profiles** for supported locally and remotely hosted desktop and mobile web browsers (put these in in your
1146
+ `cucumber.yml` file). Before you can use the BrowserStack, CrossBrowserTesting, Sauce Labs, or TestingBot services, you will need to
1147
+ replace the *INSERT USER NAME HERE* and *INSERT PASSWORD HERE* placeholder text with your user account and authorization code for the cloud
1148
+ service(s) that you intend to connect with.
1149
+
1150
+
1151
+ <% desktop = "--tags ~@wip --tags ~@failing --tags @desktop --require features BROWSER_SIZE=1600,1000" %>
1152
+ <% mobile = "--tags ~@wip --tags ~@failing --tags @mobile --require features" %>
1153
+
1154
+ #==============
1155
+ # profiles for locally hosted desktop web browsers
1156
+ #==============
1157
+
1158
+ firefox: WEB_BROWSER=firefox <%= desktop %>
1159
+ safari: WEB_BROWSER=safari <%= desktop %>
1160
+ chrome: WEB_BROWSER=chrome <%= desktop %>
1161
+ ie: WEB_BROWSER=ie <%= desktop %>
1162
+ headless: WEB_BROWSER=poltergeist <%= desktop %>
1163
+
1164
+ #==============
1165
+ # profiles for locally hosted mobile web browsers (emulated locally in Firefox browser)
1166
+ # NOTE: to host emulated mobile browsers in Chrome set the HOST_BROWSER=chrome
1167
+ #==============
1168
+
1169
+ ipad: WEB_BROWSER=ipad HOST_BROWSER=chrome <%= mobile %>
1170
+ ipad_pro: WEB_BROWSER=ipad_pro HOST_BROWSER=chrome <%= mobile %>
1171
+ ipad_pro_10_5: WEB_BROWSER=ipad_pro_10_5 HOST_BROWSER=chrome <%= mobile %>
1172
+ ipad_chrome: WEB_BROWSER=ipad_chrome HOST_BROWSER=chrome <%= mobile %>
1173
+ ipad_firefox: WEB_BROWSER=ipad_firefox HOST_BROWSER=chrome <%= mobile %>
1174
+ iphone: WEB_BROWSER=iphone HOST_BROWSER=chrome <%= mobile %>
1175
+ iphone4: WEB_BROWSER=iphone4 HOST_BROWSER=chrome <%= mobile %>
1176
+ iphone5: WEB_BROWSER=iphone5 HOST_BROWSER=chrome <%= mobile %>
1177
+ iphone6: WEB_BROWSER=iphone6 HOST_BROWSER=chrome <%= mobile %>
1178
+ iphone6_plus: WEB_BROWSER=iphone6_plus HOST_BROWSER=chrome <%= mobile %>
1179
+ iphone7: WEB_BROWSER=iphone7 HOST_BROWSER=chrome <%= mobile %>
1180
+ iphone7_plus: WEB_BROWSER=iphone7_plus HOST_BROWSER=chrome <%= mobile %>
1181
+ iphone7_chrome: WEB_BROWSER=iphone7_chrome HOST_BROWSER=chrome <%= mobile %>
1182
+ iphone7_firefox: WEB_BROWSER=iphone7_firefox HOST_BROWSER=chrome <%= mobile %>
1183
+ iphone7_edge: WEB_BROWSER=iphone7_edge HOST_BROWSER=chrome <%= mobile %>
1184
+ iphone8: WEB_BROWSER=iphone8 HOST_BROWSER=chrome <%= mobile %>
1185
+ iphone8_plus: WEB_BROWSER=iphone8_plus HOST_BROWSER=chrome <%= mobile %>
1186
+ iphoneX: WEB_BROWSER=iphonex HOST_BROWSER=chrome <%= mobile %>
1187
+ android_phone: WEB_BROWSER=android_phone HOST_BROWSER=chrome <%= mobile %>
1188
+ nexus6: WEB_BROWSER=nexus6 HOST_BROWSER=chrome <%= mobile %>
1189
+ android_tablet: WEB_BROWSER=android_tablet HOST_BROWSER=chrome <%= mobile %>
1190
+ kindle_fire: WEB_BROWSER=kindle_fire HOST_BROWSER=chrome <%= mobile %>
1191
+ kindle_firehd7: WEB_BROWSER=kindle_firehd7 HOST_BROWSER=chrome <%= mobile %>
1192
+ kindle_firehd8: WEB_BROWSER=kindle_firehd8 HOST_BROWSER=chrome <%= mobile %>
1193
+ kindle_firehd10: WEB_BROWSER=kindle_firehd10 HOST_BROWSER=chrome <%= tablet %>
1194
+ surface: WEB_BROWSER=surface HOST_BROWSER=chrome <%= mobile %>
1195
+ blackberry_playbook: WEB_BROWSER=blackberry_playbook HOST_BROWSER=chrome <%= mobile %>
1196
+ samsung_galaxy_tab: WEB_BROWSER=samsung_galaxy_tab HOST_BROWSER=chrome <%= mobile %>
1197
+ google_nexus7: WEB_BROWSER=google_nexus7 HOST_BROWSER=chrome <%= mobile %>
1198
+ google_nexus9: WEB_BROWSER=google_nexus9 HOST_BROWSER=chrome <%= mobile %>
1199
+ google_nexus10: WEB_BROWSER=google_nexus10 HOST_BROWSER=chrome <%= mobile %>
1200
+ samsung_galaxy_s4: WEB_BROWSER=samsung_galaxy_s4 HOST_BROWSER=chrome <%= mobile %>
1201
+ samsung_galaxy_s5: WEB_BROWSER=samsung_galaxy_s5 HOST_BROWSER=chrome <%= mobile %>
1202
+ samsung_galaxy_s6: WEB_BROWSER=samsung_galaxy_s6 HOST_BROWSER=chrome <%= mobile %>
1203
+ pixel: WEB_BROWSER=pixel HOST_BROWSER=chrome <%= mobile %>
1204
+ pixel_xl: WEB_BROWSER=pixel_xl HOST_BROWSER=chrome <%= mobile %>
1205
+ windows_phone7: WEB_BROWSER=windows_phone7 HOST_BROWSER=chrome <%= mobile %>
1206
+ windows_phone8: WEB_BROWSER=windows_phone8 HOST_BROWSER=chrome <%= mobile %>
1207
+ lumia_950_xl: WEB_BROWSER=lumia_950_xl HOST_BROWSER=chrome <%= mobile %>
1208
+ blackberry_z10: WEB_BROWSER=blackberry_z10 HOST_BROWSER=chrome <%= mobile %>
1209
+ blackberry_z30: WEB_BROWSER=blackberry_z30 HOST_BROWSER=chrome <%= mobile %>
1210
+ blackberry_leap: WEB_BROWSER=blackberry_leap HOST_BROWSER=chrome <%= mobile %>
1211
+ blackberry_passport: WEB_BROWSER=blackberry_passport HOST_BROWSER=chrome <%= mobile %>
1212
+
1213
+
1214
+ #==============
1215
+ # profiles for mobile device screen orientation
1216
+ #==============
1217
+
1218
+ portrait: ORIENTATION=portrait
1219
+ landscape: ORIENTATION=landscape
1220
+
1221
+
1222
+ #==============
1223
+ # profiles for mobile Safari web browsers hosted within XCode iOS simulator
1224
+ # NOTE: Requires installation of XCode, iOS version specific target simulators, Appium, and the appium_capybara gem
1225
+ #==============
1226
+
1227
+ appium_ios: WEB_BROWSER=appium APP_PLATFORM_NAME="iOS" APP_BROWSER="Safari" <%= mobile %>
1228
+ app_ios_10: --profile appium_ios APP_VERSION="10.3"
1229
+ app_ios_11: --profile appium_ios APP_VERSION="11.2"
1230
+
1231
+ iphone_7_plus_10_sim: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="iPhone 7 Plus"
1232
+ iphone_7_10_sim: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="iPhone 7"
1233
+ iphone_7se_10_sim: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="iPhone SE"
1234
+ iphone_6s_plus_10_sim: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="iPhone 6s Plus"
1235
+ iphone_6s_10_sim: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="iPhone 6s"
1236
+ iphone_SE_10_sim: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="iPhone SE"
1237
+ iphone_X_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone X"
1238
+ iphone_8_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone 8"
1239
+ iphone_8_plus_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone 8 Plus"
1240
+ iphone_7_plus_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone 7 Plus"
1241
+ iphone_7_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone 7"
1242
+ iphone_7se_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone SE"
1243
+ iphone_6s_plus_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone 6s Plus"
1244
+ iphone_6s_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone 6s"
1245
+ iphone_SE_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone SE"
1246
+
1247
+ ipad_pro_12_9_11_sim: --profile app_ios_11 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (12.9-inch)"
1248
+ ipad_pro_12_9_10_sim: --profile app_ios_10 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (12.9-inch)"
1249
+ ipad_pro_10_5_11_sim: --profile app_ios_11 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (10.5-inch)"
1250
+ ipad_pro_10_5_10_sim: --profile app_ios_10 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (10.5-inch)"
1251
+ ipad_pro_9_7_11_sim: --profile app_ios_11 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (9.7-inch)"
1252
+ ipad_pro_9_7_10_sim: --profile app_ios_10 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (9.7-inch)"
1253
+ ipad_air_2_11_sim: --profile app_ios_11 DEVICE_TYPE=tablet APP_DEVICE="iPad Air 2"
1254
+ ipad_air_2_10_sim: --profile app_ios_10 DEVICE_TYPE=tablet APP_DEVICE="iPad Air 2"
1255
+
1256
+
1257
+ #==============
1258
+ # profiles for mobile Safari web browsers running on physically connected iOS devices
1259
+ # NOTE: Requires installation of XCode, Appium, and the appium_capybara gem
1260
+ #==============
1261
+
1262
+ my_ios_10_3_iphone: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="My Test iPhone6" APP_UDID="INSERT YOUR DEVICE UDID"
1263
+ my_ios_10_3_ipad: --profile app_ios_10 DEVICE_TYPE=tablet APP_DEVICE="My Test iPad Pro" APP_UDID="INSERT YOUR DEVICE UDID"
1264
+
1265
+
1266
+ #==============
1267
+ # profiles for Android mobile web browsers hosted within Android Studio Android Virtual Device emulators
1268
+ # NOTE: Requires installation of Android Studio, Android version specific virtual device simulators, Appium, and the appium_capybara gem
1269
+ #==============
1270
+
1271
+ appium_android: WEB_BROWSER=appium APP_PLATFORM_NAME="Android" <%= mobile %>
1272
+ android_api_26: --profile appium_android APP_BROWSER="Chrome" APP_VERSION="8.0"
1273
+ android_api_23: --profile appium_android APP_BROWSER="Browser" APP_VERSION="6.0"
1274
+ pixel_xl_api26_sim: --profile android_api_26 DEVICE_TYPE=phone APP_DEVICE="Pixel_XL_API_26"
1275
+ pixel_2_xl_api26_sim: --profile android_api_26 DEVICE_TYPE=phone APP_DEVICE="Pixel_2_XL_API_26"
1276
+ nexus_6_api23_sim: --profile android_api_23 DEVICE_TYPE=phone APP_DEVICE="Nexus_6_API_23"
1277
+
1278
+ #==============
1279
+ # profiles for remotely hosted web browsers on the BrowserStack service
1280
+ #==============
1281
+
1282
+ browserstack: WEB_BROWSER=browserstack BS_USERNAME=<INSERT USER NAME HERE> BS_AUTHKEY=<INSERT PASSWORD HERE>
1283
+ bs_desktop: --profile browserstack <%= desktop %> RESOLUTION="1920x1080"
1284
+ bs_mobile: --profile browserstack <%= mobile %>
1285
+
1286
+ # BrowserStack OS X desktop browser profiles
1287
+ bs_macos_high_sierra: --profile bs_desktop BS_OS="OS X" BS_OS_VERSION="High Sierra"
1288
+ bs_ff_high_sierra: --profile bs_macos_high_sierra BS_BROWSER="Firefox"
1289
+ bs_chrome_high_sierra: --profile bs_macos_high_sierra BS_BROWSER="Chrome"
1290
+ bs_safari_high_sierra: --profile bs_macos_high_sierra BS_BROWSER="Safari"
1291
+
1292
+ bs_macos_sierra: --profile bs_desktop BS_OS="OS X" BS_OS_VERSION="Sierra"
1293
+ bs_ff_sierra: --profile bs_macos_sierra BS_BROWSER="Firefox"
1294
+ bs_chrome_sierra: --profile bs_macos_sierra BS_BROWSER="Chrome"
1295
+ bs_safari_sierra: --profile bs_macos_sierra BS_BROWSER="Safari"
1296
+
1297
+ bs_osx_el_capitan: --profile bs_desktop BS_OS="OS X" BS_OS_VERSION="El Capitan"
1298
+ bs_ff_el_cap: --profile bs_osx_el_capitan BS_BROWSER="Firefox"
1299
+ bs_chrome_el_cap: --profile bs_osx_el_capitan BS_BROWSER="Chrome"
1300
+ bs_safari_el_cap: --profile bs_osx_el_capitan BS_BROWSER="Safari"
1301
+
1302
+ bs_osx_yosemite: --profile bs_desktop BS_OS="OS X" BS_OS_VERSION="Yosemite"
1303
+ bs_ff_yos: --profile bs_osx_yosemite BS_BROWSER="Firefox"
1304
+ bs_chrome_yos: --profile bs_osx_yosemite BS_BROWSER="Chrome"
1305
+ bs_safari_yos: --profile bs_osx_yosemite BS_BROWSER="Safari"
1306
+
1307
+ bs_osx_mavericks: --profile bs_desktop BS_OS="OS X" BS_OS_VERSION="Mavericks"
1308
+ bs_ff_mav: --profile bs_osx_mavericks BS_BROWSER="Firefox"
1309
+ bs_chrome_mav: --profile bs_osx_mavericks BS_BROWSER="Chrome"
1310
+ bs_safari_mav: --profile bs_osx_mavericks BS_BROWSER="Safari"
1311
+
1312
+ # BrowserStack Windows desktop browser profiles
1313
+ bs_win7: --profile bs_desktop BS_OS="Windows" BS_OS_VERSION="7"
1314
+ bs_win8: --profile bs_desktop BS_OS="Windows" BS_OS_VERSION="8"
1315
+ bs_win10: --profile bs_desktop BS_OS="Windows" BS_OS_VERSION="10"
1316
+ bs_ff_win7: --profile bs_win7 BS_BROWSER="Firefox"
1317
+ bs_ff_win8: --profile bs_win8 BS_BROWSER="Firefox"
1318
+ bs_ff_win10: --profile bs_win10 BS_BROWSER="Firefox"
1319
+ bs_chrome_win7: --profile bs_win7 BS_BROWSER="Chrome"
1320
+ bs_chrome_win8: --profile bs_win8 BS_BROWSER="Chrome"
1321
+ bs_chrome_win10: --profile bs_win10 BS_BROWSER="Chrome"
1322
+
1323
+ bs_ie_win7: --profile bs_win7 BS_BROWSER="IE"
1324
+ bs_ie11_win7: --profile bs_ie_win7 BS_VERSION="11.0"
1325
+ bs_ie10_win7: --profile bs_ie_win7 BS_VERSION="10.0"
1326
+ bs_ie9_win7: --profile bs_ie_win7 BS_VERSION="9.0"
1327
+ bs_ie10_win8: --profile bs_win8 BS_BROWSER="IE" BS_VERSION="10.0"
1328
+ bs_ie11_win8: --profile bs_desktop BS_OS="Windows" BS_OS_VERSION="8.1" BS_BROWSER="IE" BS_VERSION="11.0"
1329
+ bs_ie11_win10: --profile bs_win10 BS_BROWSER="IE" BS_VERSION="11.0"
1330
+ bs_edge_win10: --profile bs_win10 BS_BROWSER="Edge" BS_VERSION="15.0"
1331
+
1332
+ # BrowserStack iOS mobile browser profiles
1333
+ bs_iphone: --profile bs_mobile BS_PLATFORM=MAC BS_OS=ios BS_BROWSER=iPhone DEVICE_TYPE=phone
1334
+ bs_iphone6s_plus: --profile bs_iphone BS_DEVICE="iPhone 6S Plus"
1335
+ bs_iphone6s: --profile bs_iphone BS_DEVICE="iPhone 6S"
1336
+ bs_iphone6_plus: --profile bs_iphone BS_DEVICE="iPhone 6 Plus"
1337
+ bs_iphone6: --profile bs_iphone BS_DEVICE="iPhone 6"
1338
+ bs_iphone5s: --profile bs_iphone BS_DEVICE="iPhone 5S"
1339
+ bs_iphone4s: --profile bs_iphone BS_DEVICE="iPhone 4S (6.0)"
1340
+
1341
+ bs_ipad: --profile bs_mobile BS_PLATFORM=MAC BS_BROWSER=iPad DEVICE_TYPE=tablet
1342
+ bs_ipad_pro: --profile bs_ipad BS_DEVICE="iPad Pro"
1343
+ bs_ipad_air2: --profile bs_ipad BS_DEVICE="iPad Air 2"
1344
+ bs_ipad_air: --profile bs_ipad BS_DEVICE="iPad Air"
1345
+ bs_ipad_mini: --profile bs_ipad BS_DEVICE="iPad Mini 4"
1346
+
1347
+ # BrowserStack iOS real device mobile browser profiles
1348
+ bs_iphone_device: --profile bs_iphone BS_REAL_MOBILE="true"
1349
+ bs_iphoneX: --profile bs_iphone_device BS_OS_VERSION="11.0" BS_DEVICE="iPhone X"
1350
+ bs_iphone8_plus: --profile bs_iphone_device BS_OS_VERSION="11.0" BS_DEVICE="iPhone 8 Plus"
1351
+ bs_iphone8: --profile bs_iphone_device BS_OS_VERSION="11.0" BS_DEVICE="iPhone 8"
1352
+ bs_iphone7_plus: --profile bs_iphone_device BS_OS_VERSION="10.3" BS_DEVICE="iPhone 7 Plus"
1353
+ bs_iphone7: --profile bs_iphone_device BS_OS_VERSION="10.3" BS_DEVICE="iPhone 7"
1354
+
1355
+ bs_ipad_device: --profile bs_ipad BS_REAL_MOBILE="true"
1356
+ bs_ipad5: --profile bs_ipad_device BS_OS_VERSION="11.0" BS_DEVICE="iPad 5th"
1357
+
1358
+ # BrowserStack Android mobile browser profiles
1359
+ bs_android: --profile bs_mobile BS_PLATFORM=ANDROID BS_BROWSER=android BS_OS=android
1360
+ bs_android_phone: --profile bs_android DEVICE_TYPE=phone
1361
+ bs_galaxy_s5: --profile bs_android_phone BS_DEVICE="Samsung Galaxy S5"
1362
+ bs_nexus5: --profile bs_android_phone BS_DEVICE="Google Nexus 5"
1363
+ bs_moto_razr: --profile bs_android_phone BS_DEVICE="Motorola Razr"
1364
+ bs_sony_xperia: --profile bs_android_phone BS_DEVICE="Sony Xperia Tipo"
1365
+
1366
+ bs_android_tablet: --profile bs_android DEVICE_TYPE=tablet
1367
+ bs_kindle_fire_hd89: --profile bs_android_tablet BS_DEVICE="Amazon Kindle Fire HD 8.9"
1368
+ bs_kindle_fire_hdx7: --profile bs_android_tablet BS_DEVICE="Amazon Kindle Fire HDX 7"
1369
+ bs_kindle_fire2: --profile bs_android_tablet BS_DEVICE="Amazon Kindle Fire 2"
1370
+ bs_nexus7: --profile bs_android_tablet BS_DEVICE="Google Nexus 7"
1371
+
1372
+ # BrowserStack Android real device mobile browser profiles
1373
+ bs_android_device: --profile bs_mobile BS_BROWSER=android BS_OS=android BS_REAL_MOBILE="true"
1374
+ bs_google_pixel8: --profile bs_android_device BS_DEVICE="Google Pixel" BS_OS_VERSION="8.0" DEVICE_TYPE=phone
1375
+ bs_google_pixel71: --profile bs_android_device BS_DEVICE="Google Pixel" BS_OS_VERSION="7.1" DEVICE_TYPE=phone
1376
+ bs_nexus6: --profile bs_android_device BS_DEVICE="Google Nexus 6" DEVICE_TYPE=phone
1377
+ bs_galaxy_s8_plus: --profile bs_android_device BS_DEVICE="Samsung Galaxy S8 Plus" DEVICE_TYPE=phone
1378
+ bs_galaxy_s8: --profile bs_android_device BS_DEVICE="Samsung Galaxy S8" DEVICE_TYPE=phone
1379
+ bs_galaxy_s7: --profile bs_android_device BS_DEVICE="Samsung Galaxy S7" DEVICE_TYPE=phone
1380
+ bs_galaxy_s6: --profile bs_android_device BS_DEVICE="Samsung Galaxy S6" DEVICE_TYPE=phone
1381
+ bs_galaxy_note4: --profile bs_android_device BS_DEVICE="Samsung Galaxy Note 4" DEVICE_TYPE=tablet
1382
+ bs_nexus9: --profile bs_android_device BS_DEVICE="Google Nexus 9" DEVICE_TYPE=tablet
1383
+
1384
+
1385
+ #==============
1386
+ # profiles for remotely hosted web browsers on the CrossBrowserTesting service
1387
+ #==============
1388
+
1389
+ crossbrowser: WEB_BROWSER=crossbrowser CB_USERNAME=<INSERT USER NAME HERE> CB_AUTHKEY=<INSERT PASSWORD HERE>
1390
+ cb_desktop: --profile crossbrowser <%= desktop %>
1391
+ cb_mobile: --profile crossbrowser <%= mobile %>
1392
+
1393
+ # CrossBrowserTesting OS X desktop browser profiles
1394
+ cb_osx: --profile cb_desktop RESOLUTION="1920x1200"
1395
+ cb_macos_sierra: --profile cb_osx CB_OS="Mac10.12"
1396
+ cb_chrome_sierra: --profile cb_macos_sierra CB_BROWSER="Chrome53x64"
1397
+ cb_safari_sierra: --profile cb_macos_sierra CB_BROWSER="Safari10"
1398
+
1399
+ cb_osx_el_capitan: --profile cb_osx CB_OS="Mac10.11"
1400
+ cb_ff_el_cap: --profile cb_osx_el_capitan CB_BROWSER="FF46"
1401
+ cb_chrome_el_cap: --profile cb_osx_el_capitan CB_BROWSER="Chrome48x64"
1402
+ cb_safari_el_cap: --profile cb_osx_el_capitan CB_BROWSER="Safari9"
1403
+
1404
+ cb_osx_yosemite: --profile cb_osx CB_OS="Mac10.10"
1405
+ cb_ff_yos: --profile cb_osx_yosemite CB_BROWSER="FF46"
1406
+ cb_chrome_yos: --profile cb_osx_yosemite CB_BROWSER="Chrome48x64"
1407
+ cb_safari_yos: --profile cb_osx_yosemite CB_BROWSER="Safari8"
1408
+
1409
+ cb_osx_mavericks: --profile cb_osx CB_OS="Mac10.9"
1410
+ cb_ff_mav: --profile cb_osx_mavericks CB_BROWSER="FF46"
1411
+ cb_chrome_mav: --profile cb_osx_mavericks CB_BROWSER="Chrome48x64"
1412
+ cb_safari_mav: --profile cb_osx_mavericks CB_BROWSER="Safari7"
1413
+
1414
+ # CrossBrowserTesting Windows desktop browser profiles
1415
+ cb_win: --profile cb_desktop RESOLUTION="1920x1080"
1416
+ cb_win7: --profile cb_win CB_OS="Win7x64-C1"
1417
+ cb_win8: --profile cb_win CB_OS="Win8"
1418
+ cb_win10: --profile cb_win CB_OS="Win10"
1419
+ cb_ff_win7: --profile cb_win7 CB_BROWSER="FF46"
1420
+ cb_ff_win8: --profile cb_win8 CB_BROWSER="FF46"
1421
+ cb_ff_win10: --profile cb_win10 CB_BROWSER="FF46"
1422
+ cb_chrome_win7: --profile cb_win7 CB_BROWSER="Chrome48x64"
1423
+ cb_chrome_win8: --profile cb_win8 CB_BROWSER="Chrome48x64"
1424
+ cb_chrome_win10: --profile cb_win10 CB_BROWSER="Chrome48x64"
1425
+ cb_edge_win10: --profile cb_win10 CB_BROWSER="Edge20"
1426
+
1427
+ cb_ie11_win7: --profile cb_win7 CB_BROWSER="IE11"
1428
+ cb_ie10_win7: --profile cb_win7 CB_BROWSER="IE10"
1429
+ cb_ie9_win7: --profile cb_win7 CB_BROWSER="IE9"
1430
+ cb_ie11_win8: --profile cb_win8 CB_BROWSER="IE11"
1431
+ cb_ie10_win8: --profile cb_win8 CB_BROWSER="IE10"
1432
+ cb_ie11_win10: --profile cb_win10 CB_BROWSER="IE11"
1433
+
1434
+ # CrossBrowserTesting iOS mobile browser profiles
1435
+ cb_iphone6s_plus: --profile cb_mobile DEVICE_TYPE=phone CB_PLATFORM="iPhone6sPlus-iOS9sim" CB_BROWSER="MblSafari9.0" RESOLUTION="1242x2208"
1436
+ cb_iphone6s: --profile cb_mobile DEVICE_TYPE=phone CB_PLATFORM="iPhone6s-iOS9sim" CB_BROWSER="MblSafari9.0" RESOLUTION="750x1334"
1437
+ cb_iphone6_plus: --profile cb_mobile DEVICE_TYPE=phone CB_PLATFORM="iPhone6Plus-iOS8sim" CB_BROWSER="MblSafari8.0" RESOLUTION="1242x2208"
1438
+ cb_iphone6: --profile cb_mobile DEVICE_TYPE=phone CB_PLATFORM="iPhone6-iOS8sim" CB_BROWSER="MblSafari8.0" RESOLUTION="750x1334"
1439
+ cb_iphone5s: --profile cb_mobile DEVICE_TYPE=phone CB_PLATFORM="iPhone5s-iOS7sim" CB_BROWSER="MblSafari7.0" RESOLUTION="640x1136"
1440
+ cb_ipad_pro: --profile cb_mobile DEVICE_TYPE=tablet CB_PLATFORM="iPadPro-iOS9Sim" CB_BROWSER="MblSafari9.0" RESOLUTION="2732x2048"
1441
+ cb_ipad_air2: --profile cb_mobile DEVICE_TYPE=tablet CB_PLATFORM="iPadAir2-iOS9Sim" CB_BROWSER="MblSafari9.0" RESOLUTION="2048x1536"
1442
+ cb_ipad_air: --profile cb_mobile DEVICE_TYPE=tablet CB_PLATFORM="iPadAir-iOS8Sim" CB_BROWSER="MblSafari8.0" RESOLUTION="2048x1536"
1443
+ cb_ipad_mini: --profile cb_mobile DEVICE_TYPE=tablet CB_PLATFORM="iPadMiniRetina-iOS7Sim" CB_BROWSER="MblSafari7.0" RESOLUTION="2048x1536"
1444
+
1445
+ # CrossBrowserTesting Android mobile browser profiles
1446
+ cb_nexus7: --profile cb_mobile CB_PLATFORM="Nexus7-And42" CB_BROWSER="MblChrome37" RESOLUTION="800x1280"
1447
+ cb_galaxy_tab2: --profile cb_mobile CB_PLATFORM="GalaxyTab2-And41" CB_BROWSER="MblChrome38" RESOLUTION="1280x800"
1448
+ cb_galaxy_s5: --profile cb_mobile CB_PLATFORM="GalaxyS5-And44" CB_BROWSER="MblChrome35" RESOLUTION="1080x1920"
1449
+ cb_galaxy_s4: --profile cb_mobile CB_PLATFORM="GalaxyS4-And42" CB_BROWSER="MblChrome33" RESOLUTION="1080x1920"
1450
+
1451
+
1452
+ #==============
1453
+ # profiles for remotely hosted web browsers on the SauceLabs service
1454
+ #==============
1455
+
1456
+ saucelabs: WEB_BROWSER=saucelabs SL_USERNAME=<INSERT USER NAME HERE> SL_AUTHKEY=<INSERT PASSWORD HERE>
1457
+ sl_desktop: --profile saucelabs <%= desktop %>
1458
+
1459
+ # SauceLabs OS X desktop browser profiles
1460
+ sl_osx_sierra: --profile sl_desktop SL_OS="macOS 10.12"
1461
+ sl_ff_sierra: --profile sl_osx_sierra SL_BROWSER="firefox"
1462
+ sl_chrome_sierra: --profile sl_osx_sierra SL_BROWSER="chrome"
1463
+ sl_safari_sierra: --profile sl_osx_sierra SL_BROWSER="safari"
1464
+
1465
+ sl_osx_el_capitan: --profile sl_desktop SL_OS="OS X 10.11"
1466
+ sl_ff_el_cap: --profile sl_osx_el_capitan SL_BROWSER="firefox"
1467
+ sl_chrome_el_cap: --profile sl_osx_el_capitan SL_BROWSER="chrome"
1468
+ sl_safari_el_cap: --profile sl_osx_el_capitan SL_BROWSER="safari"
1469
+
1470
+ sl_osx_yosemite: --profile sl_desktop SL_OS="OS X 10.10" RESOLUTION="1920x1200"
1471
+ sl_ff_yos: --profile sl_osx_yosemite SL_BROWSER="firefox"
1472
+ sl_chrome_yos: --profile sl_osx_yosemite SL_BROWSER="chrome"
1473
+ sl_safari_yos: --profile sl_osx_yosemite SL_BROWSER="safari"
1474
+
1475
+ sl_osx_mavericks: --profile sl_desktop SL_OS="OS X 10.9" RESOLUTION="1920x1200"
1476
+ sl_ff_mav: --profile sl_osx_mavericks SL_BROWSER="firefox"
1477
+ sl_chrome_mav: --profile sl_osx_mavericks SL_BROWSER="chrome"
1478
+ sl_safari_mav: --profile sl_osx_mavericks SL_BROWSER="safari"
1479
+
1480
+ # SauceLabs Windows desktop browser profiles
1481
+ sl_win7: --profile sl_desktop SL_OS="Windows 7" RESOLUTION="1920x1200"
1482
+ sl_win8: --profile sl_desktop SL_OS="Windows 8.1" RESOLUTION="1280x1024"
1483
+ sl_win10: --profile sl_desktop SL_OS="Windows 10" RESOLUTION="1280x1024"
1484
+ sl_ff_win7: --profile sl_win7 SL_BROWSER="firefox"
1485
+ sl_ff_win8: --profile sl_win8 SL_BROWSER="firefox"
1486
+ sl_ff_win10: --profile sl_win10 SL_BROWSER="firefox"
1487
+ sl_chrome_win7: --profile sl_win7 SL_BROWSER="chrome"
1488
+ sl_chrome_win8: --profile sl_win8 SL_BROWSER="chrome"
1489
+ sl_chrome_win10: --profile sl_win10 SL_BROWSER="chrome"
1490
+
1491
+ sl_ie11_win7: --profile sl_win7 SL_BROWSER="internet explorer" SL_VERSION="11.0"
1492
+ sl_ie10_win7: --profile sl_win7 SL_BROWSER="internet explorer" SL_VERSION="10.0"
1493
+ sl_ie9_win7: --profile sl_win7 SL_BROWSER="internet explorer" SL_VERSION="9.0"
1494
+ sl_ie11_win8: --profile sl_win8 SL_BROWSER="internet explorer" SL_VERSION="11.0"
1495
+ sl_ie11_win10: --profile sl_win10 SL_BROWSER="internet explorer"
1496
+
1497
+
1498
+ #==============
1499
+ # profiles for remotely hosted web browsers on the TestingBot service
1500
+ #==============
1501
+
1502
+ testingbot: WEB_BROWSER=testingbot TB_USERNAME=<INSERT USER NAME HERE> TB_AUTHKEY=<INSERT PASSWORD HERE>
1503
+ tb_desktop: --profile testingbot <%= desktop %> RESOLUTION="1920x1200"
1504
+ tb_mobile: --profile testingbot <%= mobile %>
1505
+
1506
+ # TestingBot OS X desktop browser profiles
1507
+ tb_macos_sierra: --profile tb_desktop TB_OS="SIERRA"
1508
+ tb_ff_sierra: --profile tb_macos_sierra TB_BROWSER="firefox"
1509
+ tb_chrome_sierra: --profile tb_macos_sierra TB_BROWSER="chrome"
1510
+ tb_safari_sierra: --profile tb_macos_sierra TB_BROWSER="safari" TB_VERSION="10"
1511
+
1512
+ tb_osx_el_capitan: --profile tb_desktop TB_OS="CAPITAN"
1513
+ tb_ff_el_cap: --profile tb_osx_el_capitan TB_BROWSER="firefox"
1514
+ tb_chrome_el_cap: --profile tb_osx_el_capitan TB_BROWSER="chrome"
1515
+ tb_safari_el_cap: --profile tb_osx_el_capitan TB_BROWSER="safari" TB_VERSION="9"
1516
+
1517
+ tb_osx_yosemite: --profile tb_desktop TB_OS="YOSEMITE"
1518
+ tb_ff_yos: --profile tb_osx_yosemite TB_BROWSER="firefox"
1519
+ tb_chrome_yos: --profile tb_osx_yosemite TB_BROWSER="chrome"
1520
+ tb_safari_yos: --profile tb_osx_yosemite TB_BROWSER="safari" TB_VERSION="8"
1521
+
1522
+ tb_osx_mavericks: --profile tb_desktop TB_OS="MAVERICKS"
1523
+ tb_ff_mav: --profile tb_osx_mavericks TB_BROWSER="firefox"
1524
+ tb_chrome_mav: --profile tb_osx_mavericks TB_BROWSER="chrome"
1525
+ tb_safari_mav: --profile tb_osx_mavericks TB_BROWSER="safari" TB_VERSION="7"
1526
+
1527
+ # TestingBot Windows desktop browser profiles
1528
+ tb_win7: --profile tb_desktop TB_OS="WIN7"
1529
+ tb_win8: --profile tb_desktop TB_OS="WIN8"
1530
+ tb_win10: --profile tb_desktop TB_OS="WIN10"
1531
+ tb_ff_win7: --profile tb_win7 TB_BROWSER="firefox"
1532
+ tb_ff_win8: --profile tb_win8 TB_BROWSER="firefox"
1533
+ tb_ff_win10: --profile tb_win10 TB_BROWSER="firefox"
1534
+ tb_chrome_win7: --profile tb_win7 TB_BROWSER="chrome"
1535
+ tb_chrome_win8: --profile tb_win8 TB_BROWSER="chrome"
1536
+ tb_chrome_win10: --profile tb_win10 TB_BROWSER="chrome"
1537
+
1538
+ tb_ie9_win7: --profile tb_win7 TB_BROWSER="internet explorer" TB_VERSION="9"
1539
+ tb_ie11_win8: --profile tb_win8 TB_BROWSER="internet explorer" TB_VERSION="11"
1540
+ tb_ie10_win8: --profile tb_win8 TB_BROWSER="internet explorer" TB_VERSION="10"
1541
+ tb_ie11_win10: --profile tb_win10 TB_BROWSER="internet explorer" TB_VERSION="11"
1542
+ tb_edge_win10: --profile tb_win10 TB_BROWSER="microsoftedge" TB_VERSION="14"
1543
+
1544
+ # TestingBot iOS mobile browser profiles
1545
+ tb_ios: --profile tb_mobile TB_OS="MAC" TB_BROWSER="safari" TB_PLATFORM="iOS"
1546
+ tb_iphone6s_plus_10: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="10.0" TB_DEVICE="iPhone 6s Plus"
1547
+ tb_iphone6s_plus_93: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="9.3" TB_DEVICE="iPhone 6s Plus"
1548
+ tb_iphone6_plus_10: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="10.0" TB_DEVICE="iPhone 6 Plus"
1549
+ tb_iphone6_plus_93: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="9.3" TB_DEVICE="iPhone 6 Plus"
1550
+ tb_iphone6s_10: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="10.0" TB_DEVICE="iPhone 6s"
1551
+ tb_iphone6s_93: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="9.3" TB_DEVICE="iPhone 6s"
1552
+ tb_iphone5s_10: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="10.0" TB_DEVICE="iPhone 5s"
1553
+ tb_iphone5s_93: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="9.3" TB_DEVICE="iPhone 5s"
1554
+ tb_ipad_pro_10: --profile tb_ios DEVICE_TYPE=tablet TB_VERSION="10.0" TB_DEVICE="iPad Pro"
1555
+ tb_ipad_pro_93: --profile tb_ios DEVICE_TYPE=tablet TB_VERSION="9.3" TB_DEVICE="iPad Pro"
1556
+ tb_ipad_air2_10: --profile tb_ios DEVICE_TYPE=tablet TB_VERSION="10.0" TB_DEVICE="iPad Air 2"
1557
+ tb_ipad_air2_93: --profile tb_ios DEVICE_TYPE=tablet TB_VERSION="9.3" TB_DEVICE="iPad Air 2"
1558
+
1559
+
1560
+ # TestingBot Android mobile browser profiles
1561
+ tb_android: --profile tb_mobile TB_OS="ANDROID" TB_BROWSER="browser" TB_PLATFORM="Android"
1562
+ tb_nexus_s: --profile tb_android TB_VERSION="6.0" TB_DEVICE="Nexus S"
1563
+ tb_nexus_1: --profile tb_android TB_VERSION="5.0" TB_DEVICE="Nexus 1"
1564
+ tb_nexus_4: --profile tb_android TB_VERSION="6.0" TB_DEVICE="Nexus 4"
1565
+ tb_galaxy_nexus: --profile tb_android TB_VERSION="4.4" TB_DEVICE="Galaxy Nexus"
1566
+ tb_galaxy_s4: --profile tb_android TB_VERSION="4.4" TB_DEVICE="Galaxy S4"
1567
+ tb_galaxy_s5: --profile tb_android TB_VERSION="5.0" TB_DEVICE="Galaxy S5"
1568
+ tb_galaxy_s6: --profile tb_android TB_VERSION="6.0" TB_DEVICE="Galaxy S6"
1569
+
1570
+
1571
+ To specify a locally hosted target browser using a profile at runtime, you use the flag `--profile` or `-p` followed by the profile name when
1572
+ invoking Cucumber in the command line. For instance, the following command invokes Cucumber and specifies that a local instance of Chrome
1573
+ will be used as the target web browser:
1574
+
1575
+ $ cucumber -p chrome
1576
+
1577
+
1578
+ The following command specifies that Cucumber will run tests against a local instance of Firefox, which will be used to emulate an iPad Pro
1579
+ in landscape orientation:
1580
+
1581
+ $ cucumber -p ipad_pro -p landscape
1582
+
1583
+
1584
+ The following command specifies that Cucumber will run tests against an iPad Pro with iOS version 9.3 in an XCode Simulator
1585
+ in landscape orientation:
1586
+
1587
+ $ cucumber -p ipad_pro_93_sim -p landscape
1588
+
1589
+ NOTE: Appium must be running prior to executing this command
1590
+
1591
+
1592
+ The following command specifies that Cucumber will run tests against a remotely hosted Safari web browser running on an OS X Yosemite
1593
+ virtual machine on the BrowserStack service:
1594
+
1595
+ cucumber -p bs_safari_yos
1596
+
1597
+
1598
+ The following command specifies that Cucumber will run tests against a remotely hosted Mobile Safari web browser on an iPhone 6s Plus in
1599
+ landscape orientation running on the BrowserStack service:
1600
+
1601
+ $ cucumber -p bs_iphone6_plus -p landscape
1602
+
1603
+
1604
+
1605
+ ## Web Test Automation Framework Implementation
1606
+
1607
+ <img src="http://i.imgur.com/RvpxjzW.jpg" width="1024" alt="Web Framework Overview" title="Web Framework Overview">
1608
+
1609
+
1610
+
1611
+
1612
+ ## Copyright and License
1613
+
1614
+ TestCentricityâ„¢ Framework is Copyright (c) 2014-2018, Tony Mrozinski.
1615
+ All rights reserved.
1616
+
1617
+
1618
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions
1619
+ are met:
1620
+
1621
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer.
1622
+
1623
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in
1624
+ the documentation and/or other materials provided with the distribution.
1625
+
1626
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from
1627
+ this software without specific prior written permission.
1628
+
1629
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1630
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1631
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1632
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
1633
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
1634
+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.