Azy Sır
Azy Sır

Reputation: 165

How to get my selenium-standalone to start - selenium-standalone start

I am trying to run a test script in WebDriverIO except I am having an extremely difficult time.

I have cloned the code from wdio-cucumber-framework and cannot get selenium-standalone start working

Error is below - seems to be a geckodriver issue except I can't find anywhere on how to provide a fix.

/Users/adam/.nvm/versions/node/v10.15.1/lib/node_modules/selenium-standalone/bin/selenium-standalone:79 throw err; ^

Error: Missing /Users/adam/.nvm/versions/node/v10.15.1/lib/node_modules/selenium-standalone/.selenium/geckodriver/0.23.0-x64-geckodriver at /Users/adam/.nvm/versions/node/v10.15.1/lib/node_modules/selenium-standalone/lib/check-paths-existence.js:15:20 at suppressedCallback (fs.js:200:5) at FSReqWrap.oncomplete (fs.js:141:20) sira-JSS774:wdio-cucumber-framework sira$

I've tried different versions - I have installed geckodriver. It is not available in the directory this directory does not exist - .selenium/geckodriver/0.23.0-x64-geckodriver

Expecting from "selenium-standalone start" to work in the terminal as expected.

Upvotes: 1

Views: 4899

Answers (2)

ekostadinov
ekostadinov

Reputation: 6940

Facing the same issues today. As per their docs the solution is to install all driver binaries (I had to do it even if not going to use them), just that I can make the server start.

yarn selenium-standalone install --singleDriverInstall=chrome --drivers.chrome.version=95.0.4638.69
...
yarn selenium-standalone install --singleDriverInstall=geckodriver
yarn selenium-standalone install --singleDriverInstall=msedgedriver

Then running yarn selenium-standalone start --drivers.chrome.version=95.0.4638.69 solves it.

Upvotes: 1

Lawrence_NT
Lawrence_NT

Reputation: 506

selenium-standalone requires you to install the drivers using selenium-standalone install

This will download and install the drivers to the directory /path/to/node_modules/selenium-standalone/.selenium/****

After this step, selenium-standalone start will start the driver servers correctly.

Side note, I have this installed as a devDependancy with my project. This allows me to run the CLI with the npx as a prefix (kind of like sudo)

Here is a step-by-step for my config:

  1. install as a devDep npm i -D selenium-standalone
  2. install web drivers npx selenium-standalone install
  3. start the web drivers in a detached process npx selenium-standalone start &
  4. run my tests npm test

Upvotes: 1

Related Questions