Skip to content

Instantly share code, notes, and snippets.

@AllenFang
Created September 2, 2018 13:08
Show Gist options
  • Save AllenFang/17fea036b224f3349310a283f7671f64 to your computer and use it in GitHub Desktop.
Save AllenFang/17fea036b224f3349310a283f7671f64 to your computer and use it in GitHub Desktop.
import webdriver from 'selenium-webdriver';
import { Driver, Options } from 'selenium-webdriver/chrome';
const CRX_PATH = // YOUR_LOCAL_CRX_PATH
const options = new Options();
options.addExtensions(CRX_PATH);
const driver = Driver.createSession(options);
// 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