I already read much about the problem but i can´t solve it:

Starting Microsoft Edge WebDriver 118.0.2088.69 (3cedde93c7077a64704badd2b4908bc2567d26ec) on port 39280
To submit feedback, report a bug, or suggest new features, please visit https://github.com/MicrosoftEdge/EdgeWebDriver

Only local connections are allowed.
Please see https://aka.ms/WebDriverSecurity for suggestions on keeping Microsoft Edge WebDriver safe.

I´m using the MSEdge version 118.0.2088.69 and also the msedgedriver version of it. So there should be the problem i guess.

Thats´ the copy Path "C:\Users\A020451\OneDrive - All for One Group SE\Anlagen\Geschäfft\SeleniumWebDriver\msedgedriver.exe"

and thats my Code just a basic

package seleniumbasics;

import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.WebDriver;

public class EdgeBrowser {
    public static void main(String[] args) throws InterruptedException {

        System.setProperty("webdriver.edge.driver", "C:\\Users\\A020451\\OneDrive - All for One Group SE\\Anlagen\\Geschäfft\\SeleniumWebDriver\\msedgedriver.exe");

        WebDriver driver = new EdgeDriver();

        driver.get("https://www.w3schools.com");

        driver.quit();
    }

}

What i think is, it is not going with edge business version, im on my business Laptop idk if thats making any issue

I already installed different version of msedge driver different libariese or directorys but nothing is working. Basically i just want to open a website it can be every Website. This would be a great afford

2

There are 2 answers

6
Shawn On

If you are using latest version of selenium(v4.6.0 or higher version), then you do not have to worry about manually setting the path of msedgedriver.exe. Selenium's built-in tool Selenium Manager will handle the downloading and managing of driver for you automatically. Basically it checks the browser version and downloads the matching driver. So you don't need the below line:

System.setProperty("webdriver.edge.driver", "C:\\Users\\A020451\\OneDrive - All for One Group SE\\Anlagen\\Geschäfft\\SeleniumWebDriver\\msedgedriver.exe");

Code can be as simple as:

public static void main(String[] args) {
    WebDriver driver = new EdgeDriver();
    driver.get("https://www.w3schools.com");
    System.out.println(driver.getTitle());
    driver.quit();  
}
0
Techie_Taks On

You can try the below snippet and let me know if this works: Selenium version: 4.14.0

 WebDriver driver;    
    WebDriverManager.edgedriver().setup();
    EdgeOptions edgeOptions= new EdgeOptions();
    edgeOptions.addArguments("--remote-allow-origins=*", "ignore-certificate-errors");
    edgeOptions.addArguments("--start-maximized");
    edgeOptions.setExperimentalOption("excludeSwitches", new String[] { "enable-automation", "load-extension" });
    driver=new EdgeDriver(edgeOptions);
    driver.manage().window().maximize();
    driver.get("https://www.w3schools.com");
    driver.quit();