python webdriver open with chrome extension

Solutions on MaxInterview for python webdriver open with chrome extension by the best coders in the world

showing results for - "python webdriver open with chrome extension"
Lotta
29 Aug 2019
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()