Selenium WebDriver - 会话因 CLIENT_GONE 而终止

Tim*_*jan 5 selenium-grid selenium-firefoxdriver selenium-webdriver

我正在使用 Selenium WebDriver 在网格模式下运行一套测试。当我运行所有测试并且全部通过时,我的测试套件没有任何问题。

但是,如果测试在 200 个测试套件中失败,如果测试 121 失败,则所有剩余的测试都不会执行,并且我得到的响应为 System.InvalidOperationException: 由于所有测试的 CLIENT_GONE,会话 [] 已终止。

对此的任何指示都会非常有帮助。谢谢

下面是堆栈跟踪

Result2 Name:   AboutThem (Data Row 2)
Result2 Outcome:    Failed
Result2 Duration:   0:11:32.4810094
Result2 StackTrace: 
Server stack trace: 
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementByXPath(String xpath)
at OpenQA.Selenium.By.<>c__DisplayClasse.<XPath>b__c(ISearchContext context)
at OpenQA.Selenium.By.FindElement(ISearchContext context)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by)
at WebElementFactory.GetWebElement(IWebDriver driver, String identifier) in C:\WebElementFactory.cs:line 36
at System.Runtime.Remoting.Messaging.Message.Dispatch(Object target)
at system.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]: 
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Driver.AboutThem()
Result2 Message:    
Test method Driver.AboutThem threw exception: 
System.InvalidOperationException: Session [] was terminated due to CLIENT_GONE
Run Code Online (Sandbox Code Playgroud)