1.1.0-rc3 • Published 7 years ago
appmodel-protractor v1.1.0-rc3
appmodel-protractor
appmodel-protractor provides application modeling support for Selenium based test frameworks. This will benefit in smaller pageObjects with more scalability.
Benefits
- Reduce footprint of pageObjects.
- Promote scalability of pageObjects across different test frameworks (e.g. programming languages).
- Separate data from functions.
- Easily add requirements while defining pageObjects vs. managing (coding) assertions at the test-script level.
- No impacts to existing test frameworks - an alternative/optional/hybrid test library for Selenium/WebDriverJs based frameworks.
- Minimize the time to delivery by using simple, yet powerful, commands vs. having to learn the inner details of protractor.
Development
Install
npm install
Build
npm run build
Unit Tests
npm test
Commands
Type into Element
- type() Returns true/false.
- asyncType() Returns the value of the element after the sendKeys().
Working with Alerts
describe('Verify Alert', () => { let expectedAlert; beforeAll(() => { expectedAlert = cmdMgr.getAlert(); }); it('should display alert', () => { expect(expectedAlert.exists()).to.be.true; }) it('should ', (done) => { expectedAlert.getText().then((s) => { console.log("Alert text: " + s); done(); }) }); })
How to use appmodel-protractor in your existing Protractor tests.
- npm install --save-dev appmodel-protractor
- Create model files (using JSON format).
- Test (or spec) file a. Add dependency:
let AppModelMgr = require('appmodel-protractor');
a. Create an instance of AppModelMgr and load your model files.
let appMgr = AppModelMgr.createMgr("My Auto Tests");
appMgr.load('./myModelFiles/login.page.json');
appMgr.load('/project/Elvis/graceland.json');
Modeling
visible_when
1.1.0-rc3
7 years ago
1.1.0-rc.0
7 years ago
1.1.0
7 years ago
1.0.4-rc.7
7 years ago
1.0.4-rc.6
7 years ago
1.0.4-rc.5
7 years ago
1.0.4-rc.4
7 years ago
1.0.4-rc.2
7 years ago
1.0.4-rc.1
7 years ago
1.0.4-rc.0
7 years ago
1.0.3
7 years ago
1.0.2-rc.0
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago