Selenium Crashing: Chrome automation extension has crashed

后端 未结 10 1442
花落未央
花落未央 2020-12-29 22:05

I am using Selenium web drivers, and today, for no apparant reason I started getting an error with the message\"Chrome Automation Extension has crashed. Click this balloon

10条回答
  •  爱一瞬间的悲伤
    2020-12-29 22:22

    For Python this solved my problem use:

    from selenium import webdriver
    
    # start the browser
    options = webdriver.ChromeOptions()
    # options.add_argument("--headless")
    options.add_argument("--no-sandbox")
    # options.add_argument("--disable-dev-shm-usage")
    # options.add_argument("--disable-gpu")
    # options.add_argument("--window-size=1920,1080")
    
    driver = webdriver.Chrome(options=options)
    driver.get("https://www.google.com")
    
    print(driver.title)
    print(driver.current_url)
    
    #driver.quit() # Uncoment to keep chromedriver open.
    

提交回复
热议问题