Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Load the Chrome extension and convert to base64 format.
# This is specific to how the node-selenium webdriver sets up its capabilities.
# Refer to for more info.
data = fs.readFileSync '/tmp/location/of/extension.crx'
encodedExtension = data.toString 'base64'
capabilities =
browserName: 'chrome'
extensions: [encodedExtension] # This needs to be a base64 String array of our extensions.
# This is the driver you can now use to power all of your tests.
@driver = new webdriver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment