Selenium WebDriver - 会话因CLIENT_GONE而终止

时间:2016-03-03 01:11:52

标签: selenium-webdriver selenium-grid selenium-firefoxdriver

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

但是如果测试失败在一套200个测试中说,如果测试121失败,所有剩余的测试都没有执行,我得到的响应为 System.InvalidOperationException:由于CLIENT_GONE ,会话[]因所有测试而终止。

任何关于此的指示都会非常有帮助。感谢

下面是stacktrace

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

0 个答案:

没有答案