标题: 执行测试用例时报Unable to find element on closed window [打印本页] 作者: bear2017 时间: 2017-4-5 18:20 标题: 执行测试用例时报Unable to find element on closed window 本帖最后由 TestWriter 于 2017-4-6 11:20 编辑
测试用例实现一个登录,现在能打开登录页面,但是到输入用户这一步就出错了,使用ie11
部分错误日志如下,请问有哪位大侠知道为什么吗?
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 TestWriter.Web.SeleniumEmulator.CommandBase.?????????????????????????????????????????(RemoteWebDriver , String )
at TestWriter.Web.SeleniumEmulator.CommandBase.FindElement(SeleniumBrowser browser, CommandInfo cmdInfo, Boolean forceExceptionWhenNotFound)
at TestWriter.Web.SeleniumEmulator.CommandHandler.Type.DoExecuteCommand(SeleniumBrowser browser, CommandInfo cmdInfo)
at TestWriter.Web.SeleniumEmulator.CommandBase.Execute(SeleniumBrowser browser, CommandInfo cmdInfo)
2017-04-05 17:13:35,179 [23240] ERROR TestWriter.Common.Log4net.Log4netLoggingService - OpenQA.Selenium.NoSuchWindowException: Unable to find element on closed window
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 TestWriter.Web.SeleniumEmulator.CommandBase.?????????????????????????????????????????(RemoteWebDriver , String )
at TestWriter.Web.SeleniumEmulator.CommandBase.FindElement(SeleniumBrowser browser, CommandInfo cmdInfo, Boolean forceExceptionWhenNotFound)
at TestWriter.Web.SeleniumEmulator.CommandHandler.Type.DoExecuteCommand(SeleniumBrowser browser, CommandInfo cmdInfo)
at TestWriter.Web.SeleniumEmulator.CommandBase.Execute(SeleniumBrowser browser, CommandInfo cmdInfo)
at TestWriter.Web.SeleniumEmulator.SeleniumEmulator.InternalExecute(CommandInfo cmdInfo)
at TestWriter.Web.SeleniumEmulator.SeleniumEmulator.Execute(ExecuteTestStep step, ICommandResult& message)
at TestWriter.EmulatorServices.CommonExecuteHelper.ExecuteOperation(CommonEmulator emulator, ExecuteTestStep step, ExecuteTestItem testcase, ExecuteTest test, ICommandResult& message)作者: TestWriter 时间: 2017-4-6 08:39
友情提醒:
烦请用户提供如下信息:出错日志(Agent、客户端),重现步骤,相应的被测应用(apk)等。以方便技术支持定位问题!作者: bear2017 时间: 2017-4-6 10:38
测试的应用是测试公司内部网站的登录,估计外网登录不了。作者: bear2017 时间: 2017-4-6 18:27
我使用firefox是可以执行成功的作者: yufuchen 时间: 2017-4-17 10:19