Parveen kumar
Parveen kumar

Reputation: 11

How to install and run protractor locally

I am new on protractor platform and I tried to install and run the protractor locally on window, but I had no luck yet. Can anybody please tell me the exact step? I am able to install and run it globally.

Upvotes: 0

Views: 534

Answers (1)

yong
yong

Reputation: 13712

For you

  1. Create an empty folder as project base dir
  2. Open a terminal and cd into the new folder
  3. Execute npm init to generate package.json
  4. Execute npm install -S protractor to install protractor locally and add it into project's dependencies. (you can check protractor will appear in package.json)
  5. Prepare test script
  6. Commit test script with package.json together

For others who want to run you code locally,

  1. Clone your code to local
  2. Open terminal and cd project base dir
  3. Execute npm install to install dependencies to local
  4. Execute protractor cli to execute test

Upvotes: 1

Related Questions