With angular-cli, it helps create an angular2 app quickly. All required tools are provisioned in a simple command ng new
, including Protractor - the end-to-end testing tool for angular.
To perform the testing, run ng e2e
. It will first run webdriver-manager update
to download & install webdrivers, see pree2e
script in package.json.
However, the below error may be encountered if you are in a corporate network:
[15:10:59] E/downloader - { Error: unable to get local issuer certificate
at Error (native)
at TLSSocket.<anonymous> (_tls_wrap.js:1060:38)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket._finishInit (_tls_wrap.js:584:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:416:38) code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY' }
To workaround the issue, change pree2e
script to webdriver-manager update --ignore_ssl=true
.
Hope this helps you. Happy coding!
It works perfectly!