In this article, I am going to
discuss one of the common problems that every newbie face while trying to work
with protractor first time.
To
understand the problem statement and solution let’s get started with the protractor
installation.
As we all are aware for running
protractor one of the prerequisites is having node.js installed in the machine
which can be installed using this link.
After
installing node modules
Now for installing Protractor
globally, we need to use the below commands.
Now if we tried to check the
protractor version Sometimes it happens, we get an error message like below
‘protractor’
is not recognized as an internal or external command, operable program or batch
file.
This issue usually occurs
because of the path issue on the windows machine and we need to make sure that
the correct path of a node is configured in the windows machine.
To
fix this issue we need to follow
PATH:
C:\Program Files\nodejs;
C:\Users<<user>>\AppData\Roaming\npm;
NODE_PATH: C:\Users\<<user>>\AppData\Roaming\npm\node_modules
Now if we try to check the
protractor version it will display the correct information
Thanks Ankur, Great article, This really helped me solve my issue. thanks a ton.
ReplyWhich is best tool to automate Angular 12 Application
Reply