1

Facing "Chrome not reachable error" in my Selenium script. It was working fine couple of days back but suddenly it's throwing the error.

Chrome Browser version: 86.0.4240.111 Chromedriver version: 86.0.4240.22

package com;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;

public class Demo {

    public static void main(String args[]){
        System.setProperty("webdriver.chrome.driver", "chromedriver.exe");
        WebDriver driver = new ChromeDriver();
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
        driver.get("http://www.youtube.com");
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

    }
}
Dev
  • 2,739
  • 2
  • 21
  • 34
  • Does this answer your question? [Chrome not reachable Selenium WebDriver error](https://stackoverflow.com/questions/45688020/chrome-not-reachable-selenium-webdriver-error) – Alexey R. Oct 28 '20 at 17:22
  • just a note: you only need to set an implicit wait once. – pcalkins Oct 28 '20 at 17:43

2 Answers2

0

I faced the same issue few days back. Tried the following steps and started working fine.

  1. Update your chrome browser
  2. Download the latest driver
  3. Create a separate folder for the driver and enter the driver path in setproperty

I am not sure about syntax in java but can help you in python. Sharing the sample below if it helps

global driver
chrome_options=Options()
chrome_options.add_argument('--start-maximized')
driver=webdriver.Chrome("D:/Python/Sel_python/drivers/chromedriver.exe", chrome_options=chrome_options)
driver.implicitly_wait(5)
Libin Thomas
  • 829
  • 9
  • 18
0

Thank you all for your responses. All of a sudden the script started to work fine. I am not allowed to update Chrome as it is being handled by my organisation. I am using a compatible chromedriver as well.Not sure what was the issue but it's working fine now.

Thank you again!