Created
September 2, 2018 12:49
-
-
Save AllenFang/64929e927f743be7b7465396977347ce to your computer and use it in GitHub Desktop.
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
import webdriver from 'selenium-webdriver'; | |
import { Driver, Options } from 'selenium-webdriver/chrome'; | |
const EXT_PATH = //YOUR_LOCAL_EXTENSION_PATH | |
const chromeOptions = { args: [`load-extension=${EXT_PATH}`] }; | |
const driver = new webdriver.Builder() | |
.withCapabilities({ chromeOptions }) | |
.build(); | |
// You can start work with driver now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment