What is the use of node.js in the reporter?

advertisements

I'm very new to AngularJS. I am trying to automate an angularJS app.

  1. installed node.js
  2. installed protractor (npm install -g protractor)
  3. updated webdriver manager tool (webdriver-manager update)
  4. started the driver (webdriver-manager start)

I create a simple conf.js and spec.js files. Everything works fine and set to go.

when we execute spec.js, protractor talk to selenium webdriver which then launches the browser and does the other stuff like interacting with angularJS app. Am I correct?

So, what is the role of node.js here in protractor?

I might be wrong, if so please do correct me and explain how protractor works.

Thanks in advance :)


Node.js is an open source runtime environment to develop applications in JavaScript.

WebDriverJS has been written in Node.js and Protractor has been written on top of WebDriverJS.

Node.js will be executing the javascript code you've written in your spec and po files with its JavaScript Engine (Google V8), or as you've so colourfully described: "does the other stuff like interacting with angularJS app".

Read more here and here