引发了具有空响应的异常,该请求将HTTP请求发送到远程WebDriver服务器以获取URL http:// localhost:62120 / session // element 环境:异常:问题描述:要点:

问题描述

环境:

  • .NET core 3.1
  • Nunit 3.12
  • Nunit3adapter 3.17
  • Selenium Webdriver 3.141
  • Chromedriver 84.0.4147.3001(最新的稳定版)
  • 对应的Chrome浏览器84.0.4147.135
  • DotNetSeleniumExtras.WaitHelpers 3.11

异常:

A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL **http://localhost:55162/session//url**. The status of the exception was UnkNownError,and the message was: No connection Could be made because the target machine actively refused it. No connection Could be made because the target machine actively refused it.: 
   at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
   at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
   at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute,Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver.get_Url()
   at Swat.Extension.WebElementExtensions.<>c__displayClass19_0.<WaitUntilUrlIsChanged>b__0(IWebDriver x)
   at OpenQA.Selenium.Support.UI.DefaultWait`1.Until[TResult](Func`2 condition)

问题描述:

对于同一测试用例,在执行一个个体时会很正常,但是在按顺序执行多个案例时,它将在上一个测试完成并使用{{1 }}。

有人可以给我一些解决方案吗?

要点:

URL的WebDriver服务器似乎丢失了会话ID,即http:// localhost:62120 / session / SessionId / element,因此URL中有两个斜杠“ //”。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)