Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gkushang/nemo-pageobjects
page objects for nemo.js
https://github.com/gkushang/nemo-pageobjects
Last synced: about 2 months ago
JSON representation
page objects for nemo.js
- Host: GitHub
- URL: https://github.com/gkushang/nemo-pageobjects
- Owner: gkushang
- License: mit
- Created: 2016-09-17T22:27:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-14T21:02:36.000Z (about 8 years ago)
- Last Synced: 2024-04-25T21:45:27.306Z (8 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## nemo-pageobjects
page objects for nemo.js### nemoPage
Initializes the Page Objects automatically and attaches pages to the `nemo.page` namespace. You do not need to instantiate the pages in your suite.### Setup
1. Install
```
npm install nemo-pageobjects --save-dev
```2. Add to your suite
Add the NemoPage to your Before hook right after Nemo is launched or add as a part of Nemo callback as shown below,
'baseDir` is the path to your end to end suite, e.g. `"baseDir": "/acceptance/",` or `"baseDir": "/functional/",`
```
function _cbNemo(err) {return nemoPage({nemo: world.nemo, baseDir: world.nemo._config.get('baseDir')})
.then(callback) // success callback
.catch(callback); // error callback
}```
3. Access your pages in your suite
```
nemo.page.{pageName}, e.g. nemo.page.loginPage
```Refer to the complete E2E Example [here][1]. Nemo Page object is initialized [here][2]
[1]: https://github.paypal.com/kugajjar/nemo-cucumberjs-framework
[2]: https://github.paypal.com/kugajjar/nemo-cucumberjs-framework/blob/master/acceptance/helpers/world.js#L38-L40