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:
  1. Download and install Nodej
    1. Go to the NodeJS home page
    2. Click install to download the .msi installer package
    3. Run it and follow the instrucitons, you now have NPM (node package manager) and Node.js installed
  2. Open the Node.js command prompt and type in the following command to install protractor globally.
    1. npm install –g protractor
You are now ready for a Proof of Concept:

Demo test application and protractor tests.
Setup     

git clone https://github.com/juliemr/protractor-demo.git 
cd protractor-demo 
npm install

To run

Get a selenium server running at localhost:4444. 
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 
with node_modules/.bin/protractor test/conf.js Or if you're feeling lazy, just npm test.

Thanks to juliemr  for sharing!


Comments

Post a Comment

Popular posts from this blog

Software Testing @ Microsoft

Trim / Remove spaces in Xpath?