This project was generated by generator-modern-protractor
Fundamentals are:
- TypeScript - as project language
- ProtractorJS - as browser control framework
- JasmineJS - as test runner (extended by jasminewd)
- NPM - as package manager and runner
Basically this is standard set of technologies that is proposed by Protractor JS team.
First, do:
npm install
Instalation has postinstall
hook, that triggers webdriver-manager update
so you should have fresh chromedriver and selenium server downloaded and prepared.
If you need to update chromedriver, remove node_modules folder, and do npm install
again.
Then, start tests:
npm test
By default - dirrect connect to local chrome driver is used.
Compilation to typescript is done automatically, on the fly, and should not require any setup. Is is done thru using ts-node
module. To learn more check ts-node readme: TS-NODE
Debugging is already configured for Visual Studio Code - you should be able to put your breakpoints, and start debugging by running Debug protractor.conf.js
in debug panel.
This is done by .vscode/launch.json
and .vscode/tasks.json
. I suggest to keep this files in your repo.
- PageObjects are done using ES6 classes
- PageFragments (Components) done using ES6 classes and protractor-element-extend package
This project has additional jasmine matchers for jasmine expect()
function - .toAppear()
and .toDisappear()
. To read more about additional matchers see jasmine-protractor-matchers repo. Unfortunately, this lib does not support TypeScript yet. You should cast your expect()
function to :any
type to avoid compilation errors.
Reporting is done using packages -
- Console reporting - jasmine-reporters
- jUnit xml reporting - jasmine-reporters
Use generated XML with your continious integration system, so you won't need to generate any HTML reports from tests. By default output directory with xml results is test_results/