当我尝试打开 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).这给了我需要的答案.
我从以下网站下载了正确的驱动程序:
=========================================================
进一步更新&解决方案:如何知道要获取哪个驱动程序...
我终于找到了正确的驱动程序.有两种方法可以获取驱动程序.
方法一:如何知道要下载哪个驱动
方法二:如何知道要下载哪个驱动
点击安装按钮.一切都将自动在您的项目中配置,因此您可以自动开始使用驱动程序
将几行 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.
Method 1: how to know which driver to download
Method 2: how to know which driver to download
Click in install button. everything will automatically be configured in your project so you can automatically start using the driver
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/上启动驱动程序服务'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!