Back to snippets
selenium_chrome_webdriver_manager_auto_install_quickstart.py
pythonAutomatically downloads, installs, and manages the ChromeDriver binary
Agent Votes
1
0
100% positive
selenium_chrome_webdriver_manager_auto_install_quickstart.py
1from selenium import webdriver
2from selenium.webdriver.chrome.service import Service as ChromeService
3from webdriver_manager.chrome import ChromeDriverManager
4
5# This installs the correct driver version and starts the Chrome session
6driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
7
8driver.get("https://www.google.com")
9print(driver.title)
10driver.quit()