chromedriver.chromium.org.downloads code example

Example 1: webdriver.ChromeOptions()

from selenium import webdriver

opt = webdriver.ChromeOptions()
opt.add_argument("--disable-infobars")
opt.add_argument("start-maximized")
opt.add_argument("--disable-extensions")
opt.add_argument("--start-maximized")
opt.add_argument("no-sandbox")
opt.add_argument("--disable-gpu")
opt.add_argument("--disable-dev-shm-usage")
opt.add_argument("--incognito")
opt.add_argument("--headless")
opt.add_argument("--disable-xss-auditor")
opt.add_argument("--disable-web-security")
opt.add_argument("--allow-running-insecure-content")
opt.add_argument("--disable-setuid-sandbox")
opt.add_argument("--disable-webgl")
opt.add_argument("--disable-popup-blocking")
# Pass the argument 1 to allow and 2 to block
opt.add_experimental_option("prefs", {
    "profile.default_content_setting_values.media_stream_mic": 2,
    "profile.default_content_setting_values.media_stream_camera": 2,
    "profile.default_content_setting_values.geolocation": 2,
    "profile.default_content_setting_values.notifications": 2
})
driver = webdriver.Chrome(chromepath, chrome_options=opt)
driver.get(url)

# https://selenium-python.readthedocs.io/api.html

Example 2: selenium chromedriver

Supports Chrome version 89
Resolved issue 3667: Timed out receiving a message from rendererResolved issue 3675: GetElementLocation uses inView method which mishandles boolean as arrayResolved issue 3682: GetElementRegion returns incorrect size for elements which are partially out of viewportResolved issue 3690: ChromeDriver fails if extensions use chrome.windows API