testcentricity_web 0.6.4.1 → 0.6.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +65 -65
- data/lib/testcentricity_web/version.rb +1 -1
- data/testcentricity_web-0.6.4.1.gem +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2b57c18e6b2f09ab03ab2e2dc5fa5e093722736
|
4
|
+
data.tar.gz: e5ba500895ea6c47c7aead21ffed29f4230deb3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c97d22f6d9259139b65dede956ac2cce2f79f140950d351d456259dfa3cc6146fa423b35cf953fe2c76fc38ba2fbbe905f86fb8d945e0254d8e8a3d84139aa5
|
7
|
+
data.tar.gz: 868e738edd598c608ec4ba5e69978392edd60974b958fe3cf6283a2001ca90b7405157fb588de06596df3b525476b1dbc35e89fdcbea153232dcef1cbffe06e0
|
data/README.md
CHANGED
@@ -66,7 +66,7 @@ to update the affected feature file, scenarios, or step definitions.
|
|
66
66
|
|
67
67
|
### Defining a Page Object
|
68
68
|
|
69
|
-
Your **Page Object** class definitions should be contained within individual
|
69
|
+
Your **Page Object** class definitions should be contained within individual `.rb` files in the `features/support/pages` folder of your
|
70
70
|
test automation project. You define new **Page Objects** as shown below:
|
71
71
|
|
72
72
|
class LoginPage < TestCentricity::PageObject
|
@@ -82,17 +82,17 @@ test automation project. You define new **Page Objects** as shown below:
|
|
82
82
|
Web pages typically have names and URLs associated with them. Web pages also typically have a unique object or attribute that, when present,
|
83
83
|
indicates that the page's contents have fully loaded.
|
84
84
|
|
85
|
-
The
|
85
|
+
The `page_name` trait is registered with the **PageManager** object, which includes a `find_page` method that takes a page name as a
|
86
86
|
parameter and returns an instance of the associated **Page Object**.
|
87
87
|
|
88
|
-
A
|
89
|
-
when calling the
|
90
|
-
be appended to the base URL specified in
|
88
|
+
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
|
89
|
+
when calling the `WebDriverConnect.initialize_web_driver` method, then your `page_url` trait can be the relative URL slug that will
|
90
|
+
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
|
91
91
|
via a URL.
|
92
92
|
|
93
|
-
A
|
94
|
-
|
95
|
-
for the
|
93
|
+
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
|
94
|
+
`page_locator` trait is a CSS or Xpath expression that uniquely identifies the object or attribute. The `verify_page_exists` method waits
|
95
|
+
for the `page_locator` trait to exist.
|
96
96
|
|
97
97
|
You define your page's **Traits** as shown below:
|
98
98
|
|
@@ -183,7 +183,7 @@ A **PageSection Object** may contain other **PageSection Objects**.
|
|
183
183
|
|
184
184
|
### Defining a PageSection Object
|
185
185
|
|
186
|
-
Your **PageSection** class definitions should be contained within individual
|
186
|
+
Your **PageSection** class definitions should be contained within individual `.rb` files in the `features/support/sections` folder of
|
187
187
|
your test automation project. You define new **PageSection Objects** as shown below:
|
188
188
|
|
189
189
|
class SearchForm < TestCentricity::PageSection
|
@@ -192,7 +192,7 @@ your test automation project. You define new **PageSection Objects** as shown be
|
|
192
192
|
|
193
193
|
### Adding Traits to a PageSection Object
|
194
194
|
|
195
|
-
A **PageSection Object** typically has a root node object that encapsulates a collection of **UI Elements**. The
|
195
|
+
A **PageSection Object** typically has a root node object that encapsulates a collection of **UI Elements**. The `section_locator` trait
|
196
196
|
specifies the CSS or Xpath expression that uniquely identifies that root node object.
|
197
197
|
|
198
198
|
You define your page section's **Traits** as shown below:
|
@@ -276,8 +276,8 @@ One common implementation is shown below:
|
|
276
276
|
|
277
277
|
World(WorldPages)
|
278
278
|
|
279
|
-
The
|
280
|
-
|
279
|
+
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
|
280
|
+
`features/support` folder.
|
281
281
|
|
282
282
|
While this approach is effective for small web applications with only a few pages (and hence few **Page Objects**), it quickly becomes
|
283
283
|
cumbersome to manage if your web application has dozens of **Page Objects** that need to be instantiated and managed.
|
@@ -285,7 +285,7 @@ cumbersome to manage if your web application has dozens of **Page Objects** that
|
|
285
285
|
### Using the PageManager
|
286
286
|
|
287
287
|
The **PageManager** class provides methods for supporting the instantiation and management of **Page Objects**. In the code example below,
|
288
|
-
the
|
288
|
+
the `page_objects` method contains a hash table of your **Page Object** instances and their associated **Page Object** class names
|
289
289
|
to be instantiated by **PageManager**:
|
290
290
|
|
291
291
|
module WorldPages
|
@@ -307,9 +307,9 @@ to be instantiated by **PageManager**:
|
|
307
307
|
|
308
308
|
World(WorldPages)
|
309
309
|
|
310
|
-
The
|
310
|
+
The `WorldPages` module above should be defined in the `world_pages.rb` file in the `features/support` folder.
|
311
311
|
|
312
|
-
Include the code below in your
|
312
|
+
Include the code below in your `env.rb` file to ensure that your **Page Objects** are instantiated before your Cucumber scenarios are
|
313
313
|
executed:
|
314
314
|
|
315
315
|
include WorldPages
|
@@ -319,19 +319,19 @@ executed:
|
|
319
319
|
|
320
320
|
## Connecting to a Web Browser
|
321
321
|
|
322
|
-
The
|
322
|
+
The `WebDriverConnect.initialize_web_driver` method configures the appropriate selenium-webdriver capabilities required to establish a
|
323
323
|
connection with a target web browser, and sets the base host URL of the web site you are running your tests against.
|
324
324
|
|
325
|
-
The
|
325
|
+
The `WebDriverConnect.initialize_web_driver` method accepts a single optional parameter - the base host URL. Cucumber **Environment
|
326
326
|
Variables** are used to specify the target local or remote web browser, and the various webdriver capability parameters required to configure
|
327
327
|
the connection.
|
328
328
|
|
329
329
|
|
330
330
|
### Locally hosted desktop web browser
|
331
331
|
|
332
|
-
For locally hosted desktop web browsers, the
|
332
|
+
For locally hosted desktop web browsers, the `WEB_BROWSER` Environment Variable must be set to one of the values from the table below:
|
333
333
|
|
334
|
-
|
334
|
+
`WEB_BROWSER` | Desktop Platform
|
335
335
|
--------------- | ----------------
|
336
336
|
`firefox` | OS X or Windows
|
337
337
|
`chrome` | OS X or Windows
|
@@ -344,10 +344,10 @@ For locally hosted desktop web browsers, the **`WEB_BROWSER`** Environment Varia
|
|
344
344
|
### Locally hosted emulated mobile web browser
|
345
345
|
|
346
346
|
You can also run your tests against emulated mobile device browsers within a locally hosted instance of the Firefox desktop browser. You may
|
347
|
-
even specify the emulated device's screen orientation. For locally hosted emulated mobile web browsers, the
|
347
|
+
even specify the emulated device's screen orientation. For locally hosted emulated mobile web browsers, the `WEB_BROWSER` Environment Variable
|
348
348
|
must be set to one of the values from the table below:
|
349
349
|
|
350
|
-
|
350
|
+
`WEB_BROWSER` |
|
351
351
|
--------------- |
|
352
352
|
`ipad` |
|
353
353
|
`ipad_pro` |
|
@@ -359,14 +359,14 @@ must be set to one of the values from the table below:
|
|
359
359
|
`android_phone` |
|
360
360
|
`android_tablet` |
|
361
361
|
|
362
|
-
To specify the emulated device's screen orientation, you set the
|
362
|
+
To specify the emulated device's screen orientation, you set the `ORIENTATION` Environment Variable to either `portrait` or `landscape`.
|
363
363
|
|
364
364
|
|
365
365
|
### Remotely hosted desktop and mobile web browsers
|
366
366
|
|
367
367
|
You can run your automated tests against remotely hosted desktop and mobile web browsers using the BrowserStack, CrossBrowserTesting,
|
368
368
|
Sauce Labs, or TestingBot services. If your tests are running against a web site hosted on your local computer (localhost), or on a
|
369
|
-
staging server inside your LAN, you must set the
|
369
|
+
staging server inside your LAN, you must set the `TUNNELING` Environment Variable to `true`.
|
370
370
|
|
371
371
|
|
372
372
|
#### Remote desktop browsers on the BrowserStack service
|
@@ -376,15 +376,15 @@ the table below. Refer to the [Browserstack-specific capabilities chart page](ht
|
|
376
376
|
|
377
377
|
**Environment Variable** | Description
|
378
378
|
--------------- | ----------------
|
379
|
-
`WEB_BROWSER` | Must be set to
|
379
|
+
`WEB_BROWSER` | Must be set to `browserstack`
|
380
380
|
`BS_USERNAME` | Must be set to your BrowserStack account user name
|
381
381
|
`BS_AUTHKEY` | Must be set to your BrowserStack account access key
|
382
|
-
`BS_OS` | Must be set to
|
383
|
-
`BS_OS_VERSION` | Refer to
|
384
|
-
`BS_BROWSER` | Refer to
|
385
|
-
`BS_VERSION` | Refer to
|
386
|
-
`TUNNELING` | Must be
|
387
|
-
`RESOLUTION` | Refer to supported screen
|
382
|
+
`BS_OS` | Must be set to `OS X` or `Windows`
|
383
|
+
`BS_OS_VERSION` | Refer to `os_version` capability in chart
|
384
|
+
`BS_BROWSER` | Refer to `browser` capability in chart
|
385
|
+
`BS_VERSION` | Refer to `browser_version` capability in chart
|
386
|
+
`TUNNELING` | Must be `true` if you are testing against internal/local servers
|
387
|
+
`RESOLUTION` | Refer to supported screen `resolution` capability in chart
|
388
388
|
|
389
389
|
|
390
390
|
#### Remote mobile browsers on the BrowserStack service
|
@@ -394,14 +394,14 @@ the table below. Refer to the [Browserstack-specific capabilities chart page](ht
|
|
394
394
|
|
395
395
|
**Environment Variable** | Description
|
396
396
|
--------------- | ----------------
|
397
|
-
`WEB_BROWSER` | Must be set to
|
397
|
+
`WEB_BROWSER` | Must be set to `browserstack`
|
398
398
|
`BS_USERNAME` | Must be set to your BrowserStack account user name
|
399
399
|
`BS_AUTHKEY` | Must be set to your BrowserStack account access key
|
400
|
-
`BS_BROWSER` | Must be set to
|
401
|
-
`BS_PLATFORM` | Must be set to
|
402
|
-
`BS_DEVICE` | Refer to
|
403
|
-
`TUNNELING` | Must be
|
404
|
-
`ORIENTATION` | set to
|
400
|
+
`BS_BROWSER` | Must be set to `iPhone`, `iPad`, or `android`
|
401
|
+
`BS_PLATFORM` | Must be set to `MAC` (for iOS) or `ANDROID`
|
402
|
+
`BS_DEVICE` | Refer to `device` capability in chart
|
403
|
+
`TUNNELING` | Must be `true` if you are testing against internal/local servers
|
404
|
+
`ORIENTATION` | set to `portrait` or `landscape`
|
405
405
|
|
406
406
|
|
407
407
|
|
@@ -412,12 +412,12 @@ the table below. Use the Configuration Wizard on the [Start a Selenium Test page
|
|
412
412
|
|
413
413
|
**Environment Variable** | Description
|
414
414
|
--------------- | ----------------
|
415
|
-
`WEB_BROWSER` | Must be set to
|
415
|
+
`WEB_BROWSER` | Must be set to `crossbrowser`
|
416
416
|
`CB_USERNAME` | Must be set to your CrossBrowserTesting account user name or email address
|
417
417
|
`CB_AUTHKEY` | Must be set to your CrossBrowserTesting account access key
|
418
|
-
`CB_OS` | Refer to
|
419
|
-
`CB_BROWSER` | Refer to
|
420
|
-
`RESOLUTION` | Refer to supported
|
418
|
+
`CB_OS` | Refer to `os_api_name` capability in the sample script of the Wizard
|
419
|
+
`CB_BROWSER` | Refer to `browser_api_name` capability in the sample script of the Wizard
|
420
|
+
`RESOLUTION` | Refer to supported `screen_resolution` capability in the sample script of the Wizard
|
421
421
|
|
422
422
|
|
423
423
|
#### Remote mobile browsers on the CrossBrowserTesting service
|
@@ -427,12 +427,12 @@ the table below. Use the Configuration Wizard on the [Start a Selenium Test page
|
|
427
427
|
|
428
428
|
**Environment Variable** | Description
|
429
429
|
--------------- | ----------------
|
430
|
-
`WEB_BROWSER` | Must be set to
|
430
|
+
`WEB_BROWSER` | Must be set to `crossbrowser`
|
431
431
|
`CB_USERNAME` | Must be set to your CrossBrowserTesting account user name or email address
|
432
432
|
`CB_AUTHKEY` | Must be set to your CrossBrowserTesting account access key
|
433
|
-
`CB_PLATFORM` | Refer to
|
434
|
-
`CB_BROWSER` | Refer to
|
435
|
-
`RESOLUTION` | Refer to supported
|
433
|
+
`CB_PLATFORM` | Refer to `os_api_name` capability in the sample script of the Wizard
|
434
|
+
`CB_BROWSER` | Refer to `browser_api_name` capability in the sample script of the Wizard
|
435
|
+
`RESOLUTION` | Refer to supported `screen_resolution` capability in the sample script of the Wizard
|
436
436
|
|
437
437
|
|
438
438
|
|
@@ -443,13 +443,13 @@ the table below. Use the Selenium API on the [Platform Configurator page](https:
|
|
443
443
|
|
444
444
|
**Environment Variable** | Description
|
445
445
|
--------------- | ----------------
|
446
|
-
`WEB_BROWSER` | Must be set to
|
446
|
+
`WEB_BROWSER` | Must be set to `saucelabs`
|
447
447
|
`SL_USERNAME` | Must be set to your Sauce Labs account user name or email address
|
448
448
|
`SL_AUTHKEY` | Must be set to your Sauce Labs account access key
|
449
|
-
`SL_OS` | Refer to
|
450
|
-
`SL_BROWSER` | Must be set to
|
451
|
-
`SL_VERSION` | Refer to
|
452
|
-
`RESOLUTION` | Refer to supported
|
449
|
+
`SL_OS` | Refer to `platform` capability in the Copy Code section of the Platform Configurator page
|
450
|
+
`SL_BROWSER` | Must be set to `chrome`, `firefox`, `safari`, `internet explorer`, or `edge`
|
451
|
+
`SL_VERSION` | Refer to `version` capability in the Copy Code section of the Platform Configurator page
|
452
|
+
`RESOLUTION` | Refer to supported `screenResolution` capability in the Copy Code section of the Platform Configurator page
|
453
453
|
|
454
454
|
|
455
455
|
#### Remote mobile browsers on the Sauce Labs service
|
@@ -459,15 +459,15 @@ the table below. Use the Selenium API on the [Platform Configurator page](https:
|
|
459
459
|
|
460
460
|
**Environment Variable** | Description
|
461
461
|
--------------- | ----------------
|
462
|
-
`WEB_BROWSER` | Must be set to
|
462
|
+
`WEB_BROWSER` | Must be set to `saucelabs`
|
463
463
|
`SL_USERNAME` | Must be set to your Sauce Labs account user name or email address
|
464
464
|
`SL_AUTHKEY` | Must be set to your Sauce Labs account access key
|
465
|
-
`SL_PLATFORM` | Refer to
|
466
|
-
`SL_BROWSER` | Must be set to
|
467
|
-
`SL_VERSION` | Refer to
|
468
|
-
`SL_DEVICE` | Refer to
|
469
|
-
`SL_DEVICE_TYPE` | If displayed, refer to
|
470
|
-
`ORIENTATION` | Refer to
|
465
|
+
`SL_PLATFORM` | Refer to `platform` capability in the Copy Code section of the Platform Configurator page
|
466
|
+
`SL_BROWSER` | Must be set to `iPhone` or `android`
|
467
|
+
`SL_VERSION` | Refer to `version` capability in the Copy Code section of the Platform Configurator page
|
468
|
+
`SL_DEVICE` | Refer to `deviceName` capability in the Copy Code section of the Platform Configurator page
|
469
|
+
`SL_DEVICE_TYPE` | If displayed, refer to `deviceType` capability in the Copy Code section of the Platform Configurator page
|
470
|
+
`ORIENTATION` | Refer to `deviceOrientation` capability in the Copy Code section of the Platform Configurator page
|
471
471
|
|
472
472
|
|
473
473
|
#### Remote desktop browsers on the TestingBot service
|
@@ -477,24 +477,24 @@ the table below. Refer to the [TestingBot List of Available Browsers page](https
|
|
477
477
|
|
478
478
|
**Environment Variable** | Description
|
479
479
|
--------------- | ----------------
|
480
|
-
`WEB_BROWSER` | Must be set to
|
480
|
+
`WEB_BROWSER` | Must be set to `testingbot`
|
481
481
|
`TB_USERNAME` | Must be set to your TestingBot account user name
|
482
482
|
`TB_AUTHKEY` | Must be set to your TestingBot account access key
|
483
|
-
`TB_OS` | Refer to
|
484
|
-
`TB_BROWSER` | Refer to
|
485
|
-
`TB_VERSION` | Refer to
|
486
|
-
`TUNNELING` | Must be
|
487
|
-
`RESOLUTION` | Possible values:
|
483
|
+
`TB_OS` | Refer to `platform` capability in chart
|
484
|
+
`TB_BROWSER` | Refer to `browserName` capability in chart
|
485
|
+
`TB_VERSION` | Refer to `version` capability in chart
|
486
|
+
`TUNNELING` | Must be `true` if you are testing against internal/local servers
|
487
|
+
`RESOLUTION` | Possible values: `800x600`, `1024x768`, `1280x960`, `1280x1024`, `1600x1200`, `1920x1200`, `2560x1440`
|
488
488
|
|
489
489
|
|
490
490
|
### Using Browser specific Profiles in cucumber.yml
|
491
491
|
|
492
492
|
While you can set **Environment Variables** in the command line when invoking Cucumber, a preferred method of specifying and managing
|
493
493
|
target web browsers is to create browser specific **Profiles** that set the appropriate **Environment Variables** for each target browser
|
494
|
-
in your
|
494
|
+
in your `cucumber.yml` file.
|
495
495
|
|
496
496
|
Below is a list of Cucumber **Profiles** for supported locally and remotely hosted desktop and mobile web browsers (put these in in your
|
497
|
-
|
497
|
+
`cucumber.yml` file). Before you can use the BrowserStack, CrossBrowserTesting, Sauce Labs, or TestingBot services, you will need to
|
498
498
|
replace the placeholder text with your user account and authorization code for the cloud service(s) that you intend to connect with.
|
499
499
|
|
500
500
|
<% desktop = "--tags ~@wip --tags ~@failing --tags @desktop --require features" %>
|
@@ -764,7 +764,7 @@ replace the placeholder text with your user account and authorization code for t
|
|
764
764
|
tb_edge_win10: --profile tb_win10 TB_BROWSER="microsoftedge" TB_VERSION="13"
|
765
765
|
|
766
766
|
|
767
|
-
To specify a locally hosted target browser using a profile at runtime, you use the flag
|
767
|
+
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
|
768
768
|
invoking Cucumber in the command line. For instance, the following command invokes Cucumber and specifies that a local instance of Chrome
|
769
769
|
will be used as the target web browser:
|
770
770
|
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testcentricity_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.4.
|
4
|
+
version: 0.6.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- A.J. Mrozinski
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- lib/testcentricity_web/version.rb
|
182
182
|
- lib/testcentricity_web/webdriver_helper.rb
|
183
183
|
- lib/testcentricity_web/world_extensions.rb
|
184
|
+
- testcentricity_web-0.6.4.1.gem
|
184
185
|
- testcentricity_web.gemspec
|
185
186
|
homepage: ''
|
186
187
|
licenses:
|