In our previous post we have discussed about Protractor and its features. Now how we can install protractor in our windows machine will be discussed here.
Node.js : Protractor is a Node.js program. So we need to install Node.js before installing protractor.
Jasmine : Protractor uses Jasmine Framework by default. It is not needed to install Jasmine separately.
Java Development Kit (JDK) : For running selenium Standalone server it is needed to install JDK.
Step 1 : Install JDK
How to install JDK is found in my another post. Also you can visit to Java download page to download and install JDK. You can also take help from this link to install JDK
Step 2 : Install Node.js application
- Go to Node.js download page https://nodejs.org/en/download/
- Click on the installer for windows.
- Double click on the installer file. In my case it is “node-v5.0.0-x86.msi”. A pop up window is displayed.
- Click on Run button.
- Node.js setup window is displayed. Click on Next button.
- Check on the checkbox named “I accept the terms in the License agreement”. Click on Next button.
- Keep the destination path same in this window and click on Next button.
- Click on Next button.
- Click on Install button.
- A pop up window is displayed and click on Yes button.
- Installation starts.
- Click on Finish button.
- Node.js installation is now complete.
- In order to verify that node.js is installed properly, open command prompt window by writing “cmd” text in the run text box and press Enter key from Keyboard.
- Command prompt window is displayed and type the following command.
- Inspect that node.js version 5.0.0 is displayed.
- It is proved that node.js is installed properly.
- Open Command prompt typing the text “cmd” at run text box and press enter button.
- Command prompt window is displayed.
- Type the following command to install protractor globally. Note that it installs two command line tools – protractor and webdriver-manager. It also installs Protractor API (library).
- Press Enter key.
- Protractor starts installing.
- After finishing installation type the following command to verify that protractor has been installed successfully.
- Press Enter key.
- It shows the protractor version. It means that protractor has been installed successfully.
- Now type the following update command that will install standalone selenium server and ChromeDriver.
- Press enter key and it starts installing.
- After finishing installation run the standalone selenium server to verify that it is running. We need to run it before executing protractor test script. The command will be,
Now our environment is ready to run protractor test script. So it’s time for writing protractor test. Our next post will be on that topic.
Happy UI Testing with Protractor!!!