Build FirefoxDriver with specified binary: https://remarkablemark.org/blog/2016/06/15/firefox-binary-webdriverjs/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"start": "node webdriverjs-set-binary" | |
}, | |
"dependencies": { | |
"selenium-webdriver": "^3.6.0" | |
}, | |
"engines": { | |
"node": ">=8", | |
"npm": ">=6" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Builder } = require('selenium-webdriver'); | |
const { Options } = require('selenium-webdriver/firefox'); | |
// replace `path/to/binary` with your binary path | |
const options = new Options().setBinary('path/to/binary'); | |
const driver = new Builder() | |
.forBrowser('firefox') | |
.setFirefoxOptions(options) | |
.build(); | |
driver.sleep(3000); | |
driver.quit(); |
Not working
not working
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install
Usage
# update argument: https://gist.github.com/remarkablemark/e56ce969c4d5fe81f7a639f519cb417b#file-webdriverjs-set-binary-js-L24 node webdriverjs-set-binary.js