ChromeWebDriver - unknown error: Chrome failed to start: crashed

前端 未结 10 2023
一整个雨季
一整个雨季 2020-11-29 11:00

I\'m trying to test my application on Chrome with ChromeWebDriver but every time I try I get following exception:

   org.openqa.selenium.WebDriverException:          


        
相关标签:
10条回答
  • 2020-11-29 11:45

    Eventually I found out that WebDriver was trying to run Chrome from C:\Users\______\AppData\Local\Google\Chrome\Application\chrome.exe, which was not working even when trying it manually. It was very strange because when I launch Chrome I use one installed in Program Files directory and it works without problems.

    So I had uninstalled Chrome, deleted everything from c:\Users______\AppData\Local\Google\Chrome\ and installed Chrome again. After that it started working.

    0 讨论(0)
  • 2020-11-29 11:46

    im pretty sure looking at your error that your bindings for chrome may not be right - please try removing all your references to chrome and removing it from your project. then, if you havent already, install Nuget Packet Manager and download chrome webdriver from there - note there are 2 one by chromium and one from selenium.

    hope this helps - let me know and if not ill take a closer look at it.

    0 讨论(0)
  • 2020-11-29 11:47

    I had the same problem as above. and I solved it. I run selenium with chromium in alpine. My environment:

    • Alpine (Linux 3.13.0-24-generic x86_64)
    • Chromium 53.0.2785.92
    • chromedriver=2.22
    • selenium (3.0.1)

    and I met the error information is:

    File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.WebDriverException: Message: unknown error:    Chrome failed to start: crashed
    (Driver info: chromedriver=2.22 (5e2d5494d735a71aa5c2e7ef9bf5ce96945e92e9),platform=Linux 3.13.0-24-generic x86_64)
    

    My solution is run:

    apk add libexif udev
    

    and Then it works.

    I refer to here : https://hub.docker.com/r/rodrigomiguele/chromium/~/dockerfile/

    0 讨论(0)
  • 2020-11-29 11:50

    Uninstall, delete chrome profile from c:\Users______L\AppData\Local\Google\Chrome\ and reinstall chrome will fix the problem, it worked for me

    0 讨论(0)
提交回复
热议问题