io.github.bonigarcia.wdm.config.WebDriverManagerException: io.github.bonigarcia.wdm.config.WebDriverManagerException: org.apache.hc.client5.http.HttpHostConnectException: Connect to https://chromedriver.storage.googleapis.com:443
Although I am getting this error only when I am using Webdriver manager, if I replace the code:
ChromeOptions chromeOptions = new ChromeOptions();
WebDriverManager.chromedriver().setup();
WebDriver driver = new ChromeDriver(chromeOptions);
with
System.setProperty("webdriver.chrome.driver", pathToDriver)
it then works fine, I am currently using version:
<!-- https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager -->
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.4.1</version>
</dependency>
and I've tried with other versions as well, but nothing worked for me.
Updating the issue after BernardV comment. I am currently using version 4.10.0 in Selenium. and I tried to run directly without using webdriver manager, and below is the error I got now:
org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: Capabilities {browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*], extensions: []}}
code I've wrriten is:
@Test
public void testBrowser() {
//ChromeOptions chromeOptions = new ChromeOptions();
WebDriver driver = new ChromeDriver();
driver.get(https://www.google.com);
}