Skip to content

selenium-side-runner fails to find the proper chromedriver when it's installed using NPM #1594

@cosmo0

Description

@cosmo0

🐛 Bug Report

The NPM packages for ChromeDriver installs multiple "executable-looking" files, and the runner fails.

To Reproduce

Steps to reproduce the behavior:

npm install -g selenium-side-runner
npm install -g chromedriver

Restart the console then try to run selenium-side-runner myproject.side

Among the errors, there's a hint that it finds two executable-looking file, because there's "chromedriver" (without extension) and "chromedriver.cmd" on the stacktrace, on two lines.

info: Running test Connexion
debug: Playing state changed prep for test Connexion
info: Building driver for chrome
  console.log
     The ChromeDriver could not be found on the current PATH, trying Selenium Manager

      at new ServiceBuilder (node_modules/selenium-webdriver/chrome.js:163:15)

  console.error
    Error: The specified executable path does not exist: D:\Users\cosmo\AppData\Roaming\npm\chromedriver
    D:\Users\cosmo\AppData\Roaming\npm\chromedriver.cmd
        at new Object.<anonymous>.DriverService.Builder (D:\Users\cosmo\AppData\Roaming\npm\node_modules\selenium-side-runner\node_modules\selenium-webdriver\remote\index.js:322:13)
at new ServiceBuilder (D:\Users\tbroust\AppData\Roaming\npm\node_modules\selenium-side-runner\node_modules\selenium-webdriver\chromium.js:203:5)
        at new ServiceBuilder (D:\Users\tbroust\AppData\Roaming\npm\node_modules\selenium-side-runner\node_modules\selenium-webdriver\chrome.js:183:5)
        at Function.getDefaultService (D:\Users\tbroust\AppData\Roaming\npm\node_modules\selenium-side-runner\node_modules\selenium-webdriver\chrome.js:264:12)
        at Function.createSession (D:\Users\tbroust\AppData\Roaming\npm\node_modules\selenium-side-runner\node_modules\selenium-webdriver\chromium.js:686:49)
        at Function.createSession (D:\Users\tbroust\AppData\Roaming\npm\node_modules\selenium-side-runner\node_modules\selenium-webdriver\chrome.js:255:13)
        at createDriver (D:\Users\tbroust\AppData\Roaming\npm\node_modules\selenium-side-runner\node_modules\selenium-webdriver\index.js:149:33)
        at Builder.build (D:\Users\tbroust\AppData\Roaming\npm\node_modules\selenium-side-runner\node_modules\selenium-webdriver\index.js:677:16)
        at WebDriverExecutor.init (D:\Users\tbroust\AppData\Roaming\npm\node_modules\selenium-side-runner\node_modules\@seleniumhq\side-runtime\src\webdriver.ts:200:10)
        at Playback.init (D:\Users\tbroust\AppData\Roaming\npm\node_modules\selenium-side-runner\node_modules\@seleniumhq\side-runtime\src\playback.ts:140:25)

And sure enough, when renaming "chromedriver" (without extension) to something else, the project is run.

Also, not installing npm's version of ChromeDriver and downloading it manually/setting the path works fine.

Expected behavior

The runner should pick one of the multiple files, and not try to run both at once.

Project file reproducing this issue (highly encouraged)

Any random file will do, it happens in the runner.

Environment

OS: Windows 10 Entreprise
Selenium IDE Version: 3.17.2
Selenium SIDE Runner Version: 4.0.0-alpha.42
Node version: v16.11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions