How can I manually install selenium webdriver-manager?

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

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

      

I am unable to install this with webdriver-manager update due to connection issues, so I manually installed chromedriver.exe and selenium-server-standalone-2.46.0 to a folder that is on my window path. Am I missing any other files?

Update: selenium starts now, but I get 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)

      

+3


source to share


2 answers


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



java -jar selenium-server-standalone.jar

+1


source


Get webdriver-manager update

The protractor sets webdriver-manager

as a dependency. You can start webdriver-manager

by adding the following to your package.json.

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

      

This will allow you to run webdriver-manager

from a directory node_modules/protractor/node_modules/webdriver-manager/

. This is important if you plan to run a direct-connected browser or local driver provider.

To run them, you simply 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 can do 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 on versions

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

  • We recommend that you update your driver versions. There may be some browser versions - problems with browser driver drivers.
  • Since some versions of drivers and browsers require the latest offline version, it is recommended that you update them as well.
  • To use the latest standalone server, you must use the latest Protractor version 5, because it uses the appropriate client: selenium-webdriver@3.0.1

0


source







All Articles