how can I use selenium with my normal browser how can I use selenium with my normal browser selenium selenium

how can I use selenium with my normal browser


First, you need to download the ChromeDriver, then either put the path to the executeable to the PATH environment variable, or pass the path in the executable_path argument:

from selenium import webdriverdriver = webdriver.Chrome(executable_path='/path/to/executeable/chrome/driver')

In order to load extensions, you would need to set ChromeOptions:

from selenium import webdriverfrom selenium.webdriver.chrome.options import Optionsoptions = webdriver.ChromeOptions()options.add_extension('Adblock-Plus_v1.4.1.crx')driver = webdriver.Chrome(chrome_options=options)

You can also save the chrome user profile you have and load it to the ChromeDriver:

options = webdriver.ChromeOptions()options.add_argument('--user-data-dir=/path/to/my/profile')driver = webdriver.Chrome(chrome_options=options)

See also: