-
Notifications
You must be signed in to change notification settings - Fork 0
01 Protractor Setup
Biswajit Sundara edited this page Jan 31, 2021
·
4 revisions
- Search "node download" in google or go to https://nodejs.org/en/download/
- For windows download the installer (.msi) as per the system 32 or 64 bit.
- Once installed go to program files/node js folder and copy the path
C:\Program Files\nodejs - Create a new environment variable under system variables
NODE_HOMEwith the above path - Append the path in
Pathvariable also. - Then open command prompt and type this command
node -v - If it returns the version number like
v12.18.2then node js is successfully installed.
- npm stands for node package manager. It's included in the Node.Js
- Open command prompt and type this command
npm -v - If it returns the version number like
6.14.5then node js is successfully installed.
- We can use IDE like Eclipse, WebStorm however Visual Studio Code is the best IDE for TypeScript
- This can be downloaded from here - https://code.visualstudio.com/docs?dv=win
- Visual studio has licensing cost but the community version is free.
- Open command prompt and type this command
npm install -g protractor - This will install the protractor.
- by using npm, we are instructing the package manager to download the protractor package.
- g stands for global. So this protractor will be available globally.
- This will be installed at the AppData path
C:\Users\Biswajit\AppData\Roaming\npm\node_modules - Go to command prompt and type
protractor --version, it should return the version like 7.0.0 - This will also install
webdriver-manager
- The install protractor command also installs the `webdriver-manager``
- Check the path `C:\Users\Biswajit\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager``
- Open command prompt and type
webdriver-manager updateto refresh with latest updates` - This package is responsible for supplying browser drivers/ all selenium webdriver functionalities.`
- Type Script is the super set of Java Script. Means It has all the features from Java Script and more.
- Open command prompt and type
npm install -g typescriptto install type script - Use the command
tsc helloworld.tsto compile/generate the java script file out of type script.
Incase you want to uninstall protractor then use the command npm uninstall protractor
npm uninstall is the command to uninstall any node package.