-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
C-nodejsJavaScript BindingsJavaScript BindingsI-defectSomething is not working as intendedSomething is not working as intended
Milestone
Description
What happened?
I followed the directions to install selenium-webdriver through npm.
Then I copy-pasted the JavaScript code on the "Write your first Selenium script" page.
However, when I tried to run that code, I got an "Unable to obtain browser driver" error. The relevant page said to file a bug report.
How can we reproduce the issue?
Here is a Gist that contains the code:
https://gist.github.com/Pauan/d22b69c5e6fad00a1806ce1d9cafe7f0Relevant log output
[INFO] Searching for WebDriver executables installed on the current system...
/tmp/selenium/node_modules/selenium-webdriver/common/driverFinder.js:35
throw Error(
^
Error: Unable to obtain browser driver.
For more information on how to install drivers see
https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/. TypeError: options.getBrowserName is not a function
at getPath (/tmp/selenium/node_modules/selenium-webdriver/common/driverFinder.js:35:11)
at getAvailableBrowsers (/tmp/selenium/node_modules/selenium-webdriver/testing/index.js:121:6)
at init (/tmp/selenium/node_modules/selenium-webdriver/testing/index.js:225:59)
at suite (/tmp/selenium/node_modules/selenium-webdriver/testing/index.js:375:5)
at Object.<anonymous> (/tmp/selenium/test.js:10:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
Node.js v18.16.0Operating System
NixOS Unstable 64-bit
Selenium version
npm 4.11.0
What are the browser(s) and version(s) where you see this issue?
N/A
What are the browser driver(s) and version(s) where you see this issue?
N/A
Are you using Selenium Grid?
N/A
Metadata
Metadata
Assignees
Labels
C-nodejsJavaScript BindingsJavaScript BindingsI-defectSomething is not working as intendedSomething is not working as intended