1import os
2from selenium import webdriver
3from selenium.webdriver.chrome.options import Options
4
5
6executable_path = "path_to_webdriver"
7os.environ["webdriver.chrome.driver"] = executable_path
8
9chrome_options = Options()
10chrome_options.add_extension('path_to_extension')
11
12driver = webdriver.Chrome(executable_path=executable_path, chrome_options=chrome_options)
13driver.get("http://stackoverflow.com")
14driver.quit()