<i id='h5LMV'><tr id='h5LMV'><dt id='h5LMV'><q id='h5LMV'><span id='h5LMV'><b id='h5LMV'><form id='h5LMV'><ins id='h5LMV'></ins><ul id='h5LMV'></ul><sub id='h5LMV'></sub></form><legend id='h5LMV'></legend><bdo id='h5LMV'><pre id='h5LMV'><center id='h5LMV'></center></pre></bdo></b><th id='h5LMV'></th></span></q></dt></tr></i><div id='h5LMV'><tfoot id='h5LMV'></tfoot><dl id='h5LMV'><fieldset id='h5LMV'></fieldset></dl></div>

<tfoot id='h5LMV'></tfoot>

<small id='h5LMV'></small><noframes id='h5LMV'>

<legend id='h5LMV'><style id='h5LMV'><dir id='h5LMV'><q id='h5LMV'></q></dir></style></legend>
    • <bdo id='h5LMV'></bdo><ul id='h5LMV'></ul>

        OpenQA.Selenium.WebDriverException: '无法在 http://localhos

        时间:2023-09-13

        <tfoot id='lA5Yb'></tfoot>
      1. <small id='lA5Yb'></small><noframes id='lA5Yb'>

        • <bdo id='lA5Yb'></bdo><ul id='lA5Yb'></ul>

              <i id='lA5Yb'><tr id='lA5Yb'><dt id='lA5Yb'><q id='lA5Yb'><span id='lA5Yb'><b id='lA5Yb'><form id='lA5Yb'><ins id='lA5Yb'></ins><ul id='lA5Yb'></ul><sub id='lA5Yb'></sub></form><legend id='lA5Yb'></legend><bdo id='lA5Yb'><pre id='lA5Yb'><center id='lA5Yb'></center></pre></bdo></b><th id='lA5Yb'></th></span></q></dt></tr></i><div id='lA5Yb'><tfoot id='lA5Yb'></tfoot><dl id='lA5Yb'><fieldset id='lA5Yb'></fieldset></dl></div>
              • <legend id='lA5Yb'><style id='lA5Yb'><dir id='lA5Yb'><q id='lA5Yb'></q></dir></style></legend>
                  <tbody id='lA5Yb'></tbody>

                  本文介绍了OpenQA.Selenium.WebDriverException: '无法在 http://localhost:20548/上启动驱动程序服务'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  当我尝试打开 EdgeDriver 时出现以下错误.

                  OpenQA.Selenium.WebDriverException: '无法在 http://localhost:20548/上启动驱动程序服务'

                  FirefoxDriver 和 ChromeDriver 工作正常.

                  这是驱动程序的问题?

                  端口 20548 上没有任何运行.下面的代码没有返回任何内容.

                  C:WINDOWSsystem32>netstat -a -o |找到20548"

                  除了将 Selenium.WebDriver.MicrosoftWebDriver NuGet 降级到我的项目中之外,我还需要做其他事情吗?

                  我需要在我的计算机上安装的唯一软件是最新版本的 Microsoft Edge,对吗?

                  解决方案

                  我尝试运行我项目的 bin 目录中的 MicrosoftWebDriver.exe(项目名称,Test).这给了我需要的答案.

                  我从以下网站下载了正确的驱动程序:

                  =========================================================

                  进一步更新&解决方案:如何知道要获取哪个驱动程序...

                  我终于找到了正确的驱动程序.有两种方法可以获取驱动程序.

                  1. 从微软开发者网站下载
                  2. 在 Visual Studio NuGet 管理器中找到它,让管理器将其配置到您的项目中(首选方法)

                  方法一:如何知道要下载哪个驱动

                  1. 转到
                  2. 配置您的项目以找到并使用您下载的 MicrosoftWebDriver.exe

                  方法二:如何知道要下载哪个驱动

                  1. 在 VS 中打开您的测试项目并打开 NuGet 包管理器
                  2. 浏览 Selenium.WebDriver.MicrosoftWebDriver
                    • 找到版本号后半部分与边缘浏览器 Microsoft EdgeHTML 版本号后半部分匹配的 webdriver 版本(根本不明显).
                  3. 点击安装按钮.一切都将自动在您的项目中配置,因此您可以自动开始使用驱动程序

                  4. 将几行 Selenium 代码添加到您的测试项目中,这将打开边缘浏览器(如原始问题所示).

                  I'm getting the following error when I try to open the EdgeDriver.

                  OpenQA.Selenium.WebDriverException: 'Cannot start the driver service on http://localhost:20548/'
                  

                  The FirefoxDriver and ChromeDriver work just fine.

                  This is an issue with the driver?

                  There is nothing running on port 20548. The below code returns nothing.

                  C:WINDOWSsystem32>netstat -a -o | find "20548"
                  

                  Did I need to do anything else besides downlowd the Selenium.WebDriver.MicrosoftWebDriver NuGet into my project?

                  The only software I need installed on my computer is the latest version of Microsoft Edge correct?

                  解决方案

                  I tried running MicrosoftWebDriver.exe that was in the bin directory of my project (project name, Test). This gave me the answer I needed.

                  I downloaded the correct driver from the following website:

                  https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/#downloads

                  ========================================================

                  Further Update & Solution: How to know which driver to get ...

                  I finally found the correct driver. There are two ways to get the driver.

                  1. By downloading it from the Microsoft developer website
                  2. Find it in the visual studio NuGet manager and let the manger configure it into your project (preferred method)

                  Method 1: how to know which driver to download

                  1. Go to the Microsoft developer website
                  2. Find the Release which has a Release number equal to the version number on your Edge browser
                  3. Configure your project to locate and use the MicrosoftWebDriver.exe you downloaded

                  Method 2: how to know which driver to download

                  1. Open your test project in VS and open the NuGet package manager
                  2. Browse for the Selenium.WebDriver.MicrosoftWebDriver
                    • Find the version of the webdriver where the last half of the version number matches the last half of your edge browser's Microsoft EdgeHTML version number (not obvious at all).
                  3. Click in install button. everything will automatically be configured in your project so you can automatically start using the driver

                  4. Add the few lines of Selenium code to your test project which will open the edge browser (shown in the original question).

                  这篇关于OpenQA.Selenium.WebDriverException: '无法在 http://localhost:20548/上启动驱动程序服务'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:不支持复合类名.考虑搜索一个类名并过滤结果 下一篇:'ElementNotVisibleException:元素不可交互'错误定位谷歌搜索按钮,即使元素在谷

                  相关文章

                    <tfoot id='IZpoa'></tfoot>
                  1. <small id='IZpoa'></small><noframes id='IZpoa'>

                    <legend id='IZpoa'><style id='IZpoa'><dir id='IZpoa'><q id='IZpoa'></q></dir></style></legend>

                      <bdo id='IZpoa'></bdo><ul id='IZpoa'></ul>

                    <i id='IZpoa'><tr id='IZpoa'><dt id='IZpoa'><q id='IZpoa'><span id='IZpoa'><b id='IZpoa'><form id='IZpoa'><ins id='IZpoa'></ins><ul id='IZpoa'></ul><sub id='IZpoa'></sub></form><legend id='IZpoa'></legend><bdo id='IZpoa'><pre id='IZpoa'><center id='IZpoa'></center></pre></bdo></b><th id='IZpoa'></th></span></q></dt></tr></i><div id='IZpoa'><tfoot id='IZpoa'></tfoot><dl id='IZpoa'><fieldset id='IZpoa'></fieldset></dl></div>