问题
I tried to navigate URL with MS Edge Browser but it giving me error. My Environment is as follows: Windows: 10 64x pro. Browser: MS Edge 25.10586.0.0 Selenium WebDriver: 2.48.2
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.edge.EdgeDriver;
public class edgeBrowser {
public static void main(String[] args) {
System.setProperty("webdriver.edge.driver",
"C:\\Program Files (x86)\\Microsoft Web Driver\\MicrosoftWebDriver.exe");
WebDriver driver = new EdgeDriver();
driver.get("http://www.google.com");
}
}
MS edge browser opens but it does not navigate to google.com and I received following error
Received a request for http://localhost:17347/session
Existing Microsoft Edge process (pid: 64400) terminated forcibly.
Waiting for new request...
Received a request for http://localhost:17347/shutdown
Stopping server.
Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException: null (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 6.79 seconds
回答1:
I had the same issue (if I recall) and the solution for me was to install the driver presented as:
For the latest preview build from the Windows Insider Program, install this version of Microsoft WebDriver
Listed here: WebDriver for Microsoft Edge (Windows)
来源:https://stackoverflow.com/questions/34657951/webdriver-ms-edge-browser-does-not-get-url