5

I am attempting to run end-to-end test for an angular project using protractor and am getting the following error when I run the command 'webdriver-manager start'

enter image description here

I have run webdriver-manager update, and selenium standalone and chromedriver are up to date.

I have java installed. java -version returns

enter image description here

I also have the path to java in my system environment variables (C:\Program Files\Java\jre1.8.0_31\bin)

Does anyone have any idea how to fix this error?

cnishina
  • 5,016
  • 1
  • 23
  • 40
Ryan Spears
  • 2,963
  • 2
  • 31
  • 39

5 Answers5

2

You can also start the web driver as below,

java -Dwebdriver.ie.driver=D:\Selenium_download_New\IEDriverServer.exe -jar D:\Selenium_download_New\selenium-server-standalone-2.45.0.jar

java -Dwebdriver.chrome.driver=D:\Selenium_download_New\chromedriver.exe -jar D:\Selenium_download_New\selenium-server-standalone-2.45.0.jar

Note the Standalone.jar should be placed in the exact location as above, you can also download the standalone.jar from selenium website

Madhu S N
  • 41
  • 2
0

I had the same issue. Probably the webdriver update you are running is installing Selenium required files in another folder that it isn't inside your project folder. At least that was my case.

I was using a grunt task for running Protractor tests. If you are using the same plugin check this folder:

C:\{yourprojectfolder}\node_modules\grunt-protractor-runner\node_modules\protractor\selenium

If you don't find that folder then you are under the same issue as me. Try with another bash. You're using cmd, try with Git Bash. Locate yourself in the following directory:

C:\{yourprojectfolder}\node_modules\grunt-protractor-runner\node_modules\protractor\bin

Then run:

webdriver-manager update

Finally check the selenium folder inside your Protractor plugin. It should be created now.

I didn't have time to find why cmd is behaving different than Git Bash when running the same command inside the same folder. Each one installs the Selenium files in different places.

Matias Beckerle
  • 326
  • 4
  • 9
0

Maybe you are missing a system variable(C:\Windows\System32\ variable.). Adding this variable would solve your problem. Hope, it helps!

CodeJockey
  • 423
  • 5
  • 18
0

Add "C:\Windows\System32\" to your PATHs. On windows, right-click My Computer -> Properties -> Advanced system settings -> Environment Variables -> Edit... PATH and add "C:\Windows\System32\" to the end (with a semi-colon separating each variable).

Otherwise SET PATH=%PATH%;C:\Windows\System32

Then start web driver using below command

webdriver-manager start

Anil Kumar
  • 100
  • 9
0

SPAWN command is not available in windows.

Install git. git bash will be installed too.

Now add git bash path to the PATH environment variable.

Restart your command prompt and it will run.

Vipin Jain
  • 1,382
  • 1
  • 10
  • 19