It's my first post here. I know everyone's been getting this error eversince the Google Chrome update. I'm a beginner in programming and here are my dependenceis
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.rcv</groupId>
<artifactId>SeleniumTraining</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.8.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager -->
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>
</project>
And here are the initial code lines:
String report = "Report of Anna's DemoAutomation:";
static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM-dd HH:mm");
String now = formatter.format(ZonedDateTime.now());
static ChromeOptions options;
static WebDriver driver;
static String variablesHere = "variablesHere";
public void setUp() {
options = new ChromeOptions().setExperimentalOption("debuggerAddress", "localhost:9014");
options.addArguments("--disable-notifications");
options.addArguments("--remote-allow-origins=*");
driver = new ChromeDriver(options);
report(report);
report("Time started: " + now + "\n");
System.setProperty("webdriver.chrome.driver",
"C:\\Users\\Anna\\Downloads\\chromedriver_win32 (1)\\chromedriver.exe");
driver.manage().window().maximize();
driver.get("https://google.com");
So I've tried to use the other solutions I found on the internet such as adding options.addArguments("--remote-allow-origins=*") and also did try to add the dependency
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-http-jdk-client</artifactId>
<version>4.5.0</version>
</dependency>
and set the system property to
System.setProperty("webdriver.http.factory", "jdk-http-client");
But both solutions didn't work and I am still getting the errors. What a nightmare. Please help.