Webdriver MS Edge浏览器无法获取URL [英] Webdriver MS Edge browser does not get URL

查看:230
本文介绍了Webdriver MS Edge浏览器无法获取URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用MS Edge浏览器浏览URL,但它给了我错误. 我的环境如下: Windows:10 64x专业版. 浏览器:MS Edge 25.10586.0.0 Selenium WebDriver:2.48.2

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浏览器打开,但无法导航到google.com,并且收到以下错误消息

MS edge browser opens but it does not navigate to google.com and I received following error

已收到 http://localhost:17347/session

现有的Microsoft Edge进程(pid:64400)被强制终止.

Existing Microsoft Edge process (pid: 64400) terminated forcibly.

正在等待新请求...

Waiting for new request...

收到了对 http://localhost:17347/shutdown 的请求

停止服务器.

线程"main"中的异常org.openqa.selenium.remote.SessionNotFoundException:空(警告:服务器未提供任何堆栈跟踪信息)

Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException: null (WARNING: The server did not provide any stacktrace information)

命令持续时间或超时:6.79秒

Command duration or timeout: 6.79 seconds

推荐答案

我遇到了同样的问题(如果我记得),对我来说解决方案是安装显示为以下内容的驱动程序:

I had the same issue (if I recall) and the solution for me was to install the driver presented as:

对于Windows Insider程序的最新预览版本,请安装 此版本的Microsoft WebDriver

For the latest preview build from the Windows Insider Program, install this version of Microsoft WebDriver

在这里列出: 用于Microsoft Edge(Windows)的WebDriver

这篇关于Webdriver MS Edge浏览器无法获取URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆