Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"scripts": {
"start": "node webdriverjs-set-binary"
},
"dependencies": {
"selenium-webdriver": "^3.6.0"
},
"engines": {
"node": ">=8",
"npm": ">=6"
}
}
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();
@remarkablemark

This comment has been minimized.

Copy link
Owner Author

@remarkablemark remarkablemark commented Jun 16, 2016

Install

# change into a new directory (optional)
# make sure you have node installed
npm install selenium-webdriver
# download the script
curl https://gist.githubusercontent.com/remarkablemark/e56ce969c4d5fe81f7a639f519cb417b/raw/b77692b434511057f24a06df00ef2b4239e2e2b0/webdriverjs-set-binary.js > webdriverjs-set-binary.js

Usage

# update argument: https://gist.github.com/remarkablemark/e56ce969c4d5fe81f7a639f519cb417b#file-webdriverjs-set-binary-js-L24
node webdriverjs-set-binary.js
@danieluyo

This comment has been minimized.

Copy link

@danieluyo danieluyo commented May 29, 2017

Not working

@DollarAkshay

This comment has been minimized.

Copy link

@DollarAkshay DollarAkshay commented Mar 24, 2018

not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment