from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.chrome.service import Service from webdriver_manager.chrome import ChromeDriverManager options = Options() options.add_argument('--disable-dev-shm-usage') import os if os.name == "nt": driver = webdriver.Chrome(executable_path="chromedriver.exe") elif os.name == "posix": driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options) driver.get("https://www.google.com") print(driver.title) driver.close()