我无法使用 Selenium 使用 Edge 进行导航
I can't navigate with Edge using Selenium
我正在尝试使用 Java Selenium:
启动 Edge 浏览器
if(browser.equals("edge")) {
System.setProperty("webdriver.edge.driver", driverPath+"\MicrosoftWebDriver\MicrosoftWebDriver.exe");
driver = new EdgeDriver();
}
但我有这个例外:无法开始新的会话。可能的原因是远程服务器地址无效或浏览器启动失败。
[11:25:55.747] - Listening on http://localhost:25602/
[Ljava.lang.StackTraceElement;@4d98e41b
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '4.0.0-alpha-6', revision: '5f43a29cfc'
System info: host: 'EB00477', ip: '192.168.6.214', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '14.0.1'
Driver info: driver.version: EdgeDriver
Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '4.0.0-alpha-6', revision: '5f43a29cfc'
System info: host: 'EB00477', ip: '192.168.6.214', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '14.0.1'
Driver info: driver.version: EdgeDriver
我的 Edge 版本是:Microsoft Edge 44.18362.449.0,Microsoft EdgeHTML 18.18363
我尝试同时使用 MicrosoftWebDriver.exe
和 msedgedriver.exe
文件,但它们不起作用。
我怎样才能让它发挥作用?
看起来代码没问题,但 WebDriver 和 Edge 版本不匹配。
我从 https://www.microsoft.com/it-it/edge then I went to https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ 安装了 Edge 并下载了正确的驱动程序版本。我必须使用 msedgedriver.exe
我的代码是:
if(browser.equals("edge")) {
System.setProperty("webdriver.edge.driver", driverPath+"\MicrosoftWebDriver\msedgedriver.exe");
driver = new EdgeDriver();
}
我正在尝试使用 Java Selenium:
启动 Edge 浏览器if(browser.equals("edge")) {
System.setProperty("webdriver.edge.driver", driverPath+"\MicrosoftWebDriver\MicrosoftWebDriver.exe");
driver = new EdgeDriver();
}
但我有这个例外:无法开始新的会话。可能的原因是远程服务器地址无效或浏览器启动失败。
[11:25:55.747] - Listening on http://localhost:25602/
[Ljava.lang.StackTraceElement;@4d98e41b
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '4.0.0-alpha-6', revision: '5f43a29cfc'
System info: host: 'EB00477', ip: '192.168.6.214', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '14.0.1'
Driver info: driver.version: EdgeDriver
Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '4.0.0-alpha-6', revision: '5f43a29cfc'
System info: host: 'EB00477', ip: '192.168.6.214', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '14.0.1'
Driver info: driver.version: EdgeDriver
我的 Edge 版本是:Microsoft Edge 44.18362.449.0,Microsoft EdgeHTML 18.18363
我尝试同时使用 MicrosoftWebDriver.exe
和 msedgedriver.exe
文件,但它们不起作用。
我怎样才能让它发挥作用?
看起来代码没问题,但 WebDriver 和 Edge 版本不匹配。 我从 https://www.microsoft.com/it-it/edge then I went to https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ 安装了 Edge 并下载了正确的驱动程序版本。我必须使用 msedgedriver.exe
我的代码是:
if(browser.equals("edge")) {
System.setProperty("webdriver.edge.driver", driverPath+"\MicrosoftWebDriver\msedgedriver.exe");
driver = new EdgeDriver();
}