5

I am trying to install protractor. When I call webdriver-manager start I get:

Selenium Standalone is not present. Install with webdriver-manager update --sta
dalone

I can't install this with webdriver-manager update because of connection issues so I I manually installed chromedriver.exe and selenium-server-standalone-2.46.0 in a folder that is in my windows path. Am I missing any other files?

Update: selenium is running now but getting this error when I try to run protractor conf.js:

09:52:37.911 ERROR - org.apache.commons.exec.ExecuteException: Execution failed
(Exit value: -559038737. Caused by java.io.IOException: Cannot run program "C:\P
rogramData\work\nodejs\npm\node_modules\protractor\node_modules\chromedriver\bin
\chromedriver" (in directory "."): CreateProcess error=193, %1 is not a valid Wi
n32 application)
cnishina
  • 5,016
  • 1
  • 23
  • 40
Leeuwtje
  • 2,161
  • 5
  • 21
  • 28

2 Answers2

2

you can download selenium-server-standalone.jar and run such command:

java -jar selenium-server-standalone.jar

Sergey Teplyakov
  • 603
  • 8
  • 18
  • that is good the selenium server is up and running but when I go : protractor conf.js it says the above error. – Leeuwtje Jul 16 '15 at 00:12
1

Get webdriver-manager update working

Protractor installs webdriver-manager as a dependency. You could run webdriver-manager by adding the following in your package.json.

"scripts": {
  "webdriver-update": "webdriver-manager update",
  "webdriver-start": "webdriver-manager start"
}

This will allow you to run webdriver-manager from the node_modules/protractor/node_modules/webdriver-manager/ directory. This is important if you plan to launch the browser with direct connect or a local driver provider.

To run these, you'll just do the following:

npm run webdriver-update   // should download the latest drivers

npm run webdriver-start    // automatically start the standalone server on port 4444

Running webdriver-manager without package.json

You could run one of the following (not sure if the first one works on Windows):

node node_modules/.bin/webdriver-manager update

// the path is assumed on a typical installation.
node node_modules/protractor/node_modules/webdriver-manager/bin/webdriver-manager update

A quick note about versions

Since Protractor framework has been updated in the past year to use standalone server 2.53 and recently in version 5 to use standalone server 3.0.1. Here are my recommendations:

  • It is recommended to keep your driver versions up-to-date. There could be some browser version - browser driver provider compatibility issues.
  • Since some driver versions and browsers require the latest standalone version, it is also recommended to keep these up-to-date.
  • In order to use the latest standalone server version, you should use the latest Protractor version 5 because it uses the matching client: selenium-webdriver@3.0.1
cnishina
  • 5,016
  • 1
  • 23
  • 40