Selenium: WebDriverException:Chrome failed to start: crashed as google-chrome is no longer running so ChromeDriver is assuming that Chrome has crashed

后端 未结 14 1774
走了就别回头了
走了就别回头了 2020-11-21 23:05

Recently I switched computers and since then I can\'t launch chrome with selenium. I\'ve also tried Firefox but the browser instance just doesn\'t launch.

f         


        
14条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-21 23:26

    I came across this error on linux environment. If not using headless then you will need

    from sys import platform
        if platform != 'win32':
            from pyvirtualdisplay import Display
            display = Display(visible=0, size=(800, 600))
            display.start()
    

提交回复
热议问题