After updating Google Chrome and Selenium, tests are not running with ChromeDriver.
System:
OS: Ubuntu 20.04.5 LTS
Selenium: selenium-server-4.8.1.jar
Chrome: Version 111.0.5563.64 (Official Build) (64-bit)
Java:
openjdk version "1.8.0_362"
OpenJDK Runtime Environment (build 1.8.0_362-8u362-ga-0ubuntu1~20.04.1-b09)
OpenJDK 64-Bit Server VM (build 25.362-b09, mixed mode)
Code:
public static void main(String[] args) {
// Set up browser
ChromeDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
driver.get("https://www.example.com");
driver.manage().window().maximize();
}
Error:
org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:44211/devtools/browser/34525f00-d1ba-4249-9fc0-904e3b8be194
Build info: version: '4.8.1', revision: '8ebccac989'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.0-67-generic', java.version: '17.0.5'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.http.netty.NettyWebSocket.<init>(NettyWebSocket.java:102)
at org.openqa.selenium.remote.http.netty.NettyWebSocket.lambda$create$3(NettyWebSocket.java:128)
at org.openqa.selenium.remote.http.netty.NettyClient.openSocket(NettyClient.java:107)
at org.openqa.selenium.devtools.Connection.<init>(Connection.java:78)
at org.openqa.selenium.chromium.ChromiumDriver.lambda$new$2(ChromiumDriver.java:116)
at java.base/java.util.Optional.map(Optional.java:260)
at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:114)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:82)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:50)
at TTR.TicketReportWeekly.main(TicketReportWeekly.java:33)
Can anyone help me understand this error and also resolve it?