1

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 :)

rave
  • 1,022
  • 1
  • 12
  • 23
Saravana
  • 33
  • 2
  • 7
  • I don't even know what protractor is, but the chances are you installed nodejs to be able to use npm, a package manager for javascript (http://www.npmjs.com). There probably are some other options to install protractor without using npm (hence without using nodejs). – martskins Apr 10 '15 at 12:05

3 Answers3

4

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

Himanshu sharma
  • 7,487
  • 4
  • 42
  • 75
Tom Nijs
  • 3,835
  • 3
  • 22
  • 40
1

Protractor is a Node.js application... hence the Node requirement. Protractor is written in Javascript, so it requires a Javascript engine, which Node provides (Google V8), thus allowing it to run on a server.

Brine
  • 3,733
  • 1
  • 21
  • 38
0

Node.js is package file we are using in protractor automation tool to run the angular.js based application.It contains selenium and other browser drivers to run our applications in different environments.