Selenium doesn't open the specified URL and shows data:,

后端 未结 1 1728
滥情空心
滥情空心 2020-12-11 12:42

I am trying to open the URL using selenium in chrome. I have chromedriver available with me.

following is the code I want to execute.

from selenium i         


        
相关标签:
1条回答
  • 2020-12-11 13:28

    This error message...

    selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited normally
      (chrome not reachable)
      (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
    

    ...implies that the ChromeDriver instance was unable to start the Chrome Browser process.

    Your main issue is the google-chrome is no longer present at the expected default location of /usr/bin/

    As per ChromeDriver - Requirements the server expects you to have Chrome installed in the default location for each system:

    1 For Linux systems, the ChromeDriver expects /usr/bin/google-chrome to be a symlink to the actual Chrome binary. You can also override the Chrome binary location as follows:

    • A Windows OS based example:

      from selenium import webdriver
      from selenium.webdriver.chrome.options import Options
      
      options = Options()
      options.add_argument("start-maximized")
      options.binary_location("C:\\path\\to\\chrome.exe")
      driver = webdriver.Chrome(executable_path=r'C:\path\to\chromedriver.exe', chrome_options=options)
      driver.get('http://google.com/')
      

    Additional Considerations

    • Upgrade ChromeDriver to current ChromeDriver v2.42 level.
    • Keep Chrome version between Chrome v68-70 levels. (as per ChromeDriver v2.42 release notes)
    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
    • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
    • Execute your @Test.
    0 讨论(0)
提交回复
热议问题