Learn Protractor / Quick Protractor demo
If you are well versed with selenium then before going through the demo have a look at these slides:
http://ramonvictor.github.io/protractor/slides/#/
Now straight to the demo:
Prerequisites:
- Download and install Nodej
- Go to the NodeJS home page
- Click install to download the .msi installer package
- Run it and follow the instrucitons, you now have NPM (node package manager) and Node.js installed
- Open the Node.js command prompt and type in the following command to install protractor globally.
- npm install –g protractor
If you get the error enoent read this: http://go-gaga-over-testing.blogspot.com.au/2014/09/node-grunt-error-enoent-stat-roaming-npm.html?_sm_au_=iHV1HtWvt61rRqWs |
Demo test application and protractor tests.
Setup
git clone https://github.com/juliemr/protractor-demo.git
cd protractor-demo
java - jar "Path to the selenium jar"
Make sure the chrome driver's path is set in the system's Path variable
Run ./node_modules/.bin/webdriver-manager update
then ./node_modules/.bin/webdriver-manager start.
Start the test application server
with node app/expresserver.js Or if you're feeling lazy, just npm start.
Run the tests
Run the tests
with node_modules/.bin/protractor test/conf.js Or if you're feeling lazy, just npm test.
Thanks to juliemr for sharing!
Thanks to juliemr for sharing!
Complete tutorial here: http://angular.github.io/protractor/#/tutorial
Great.. Tutorial is just awesome..It is really helpful for a newbie like me..
ReplyDeleteAngularjs Online Training | Angularjs Training in Chennai | HTML5 Training in Chennai