package.json
{
"name": "electron_selenium",
"packageManager": "[email protected]",
"version": "1.0.0",
"main": "main.js",
"devDependencies": {
"electron": "^30.0.9",
"electron-builder": "^25.0.0-alpha.9"
},
"dependencies": {
"selenium-webdriver": "^4.21.0"
},
"scripts": {
"start": "electron .",
"pack": "electron-builder --dir",
"dist": "electron-builder"
}
}
Error:
D:Githubelectron_seleniumdistwin-unpackedresourcesapp.asarnode_modulesselenium-webdrivercommondriverFinder.js:38 Uncaught (in promise) 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/. Error: Error executing command for D:Githubelectron_seleniumdistwin-unpackedresourcesapp.asarnode_modulesselenium-webdriverbinwindowsselenium-manager.exe with –browser,chrome,–language-binding,javascript,–output,json: TypeError: Cannot read properties of null (reading ‘toString’)
at getBinaryPaths (D:Githubelectron_seleniumdistwin-unpackedresourcesapp.asarnode_modulesselenium-webdrivercommondriverFinder.js:38:11)
at thenableWebDriverProxy.createSession (D:Githubelectron_seleniumdistwin-unpackedresourcesapp.asarnode_modulesselenium-webdriverchromium.js:625:45)
at thenableWebDriverProxy.createSession (D:Githubelectron_seleniumdistwin-unpackedresourcesapp.asarnode_modulesselenium-webdriverchrome.js:217:42)
at createDriver (D:Githubelectron_seleniumdistwin-unpackedresourcesapp.asarnode_modulesselenium-webdriverindex.js:152:33)
at Builder.build (D:Githubelectron_seleniumdistwin-unpackedresourcesapp.asarnode_modulesselenium-webdriverindex.js:673:16)
at HTMLButtonElement. (renderer.js:4:57)
Why even after including it as a dependency is it not working?
https://github.com/Gaimo/electron_selenium_test
In the development environment it works normally.
I’ve already tried using npm instead of yarn.
I’ve already tested using electron-forge to build.
I would like selenium-webdriver to be automatically installed on the computer of the user who will use my application.
Guilherme is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.