Saturday, November 2, 2019

Execute Protractor Script Using package.json


Still now we have observed how to download all the project dependencies in project directory using package.json. Now we will learn how we can execute our script using package.json

Step 1:

Modify the scripts section as mention below


    "scripts": {
        "test""protractor ./e2eTest/config/conf.js",
        "webdriver-manager""./node_modules/.bin/webdriver-manager update",
        "protractor""./node_modules/protractor/build/cli.js",
        "starttest""npm install && npm run webdriver-manager && npm run test"
    },


Step 2:

Execute the following command to run the test
    npm run starttest

If we have already download all the dependencies and update the drivers then we can use the following command only
    npm run test

6 comments:

  1. Thank you for an additional great post. Exactly where else could anybody get that kind of facts in this kind of a ideal way of writing? I have a presentation next week, and I’m around the appear for this kind of data.

    Selenium Training in Electronic City

    ReplyDelete
  2. This blog is the general information for the feature. You got a good work for these blog. We have a developing our creative content of this mind. Thank you for this blog. This for very interesting and useful.
    Microsoft Azure Training in Electronic City

    ReplyDelete
  3. Nice article! I found some useful information in your blog, it was awesome to read.
    Salesforce Certification USA  

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. The Best Online Shopping UK, Selling Everything From Kitchen Accessories & Home Appliances Order Online Store UK For The Fast Home Delivery.

    ReplyDelete