我在启用了开发人员模式的情况下运行Win10,并且启动了WinAppDriver。在VS 2019中,我运行了计算器示例,但每次测试都会失败,并出现异常。然后我尝试设置一系列断点,但当我运行测试时,它从未在我的断点处中断。
下面是异常的堆栈跟踪:
Test Name: Addition
Test FullName: Test Detail Summary
Test Source: C:\Code\WinAppDriver-1.1.1\Samples\C#\CalculatorTest\ScenarioStandard.cs : line 31
Test Outcome: Failed
Test Duration: 0:00:00
Test Name: Addition
Test Outcome: Failed
Result StackTrace:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Appium.AppiumDriver`1.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebElement.Click()
at CalculatorTest.ScenarioStandard.Clear() in C:\Code\WinAppDriver-1.1.1\Samples\C#\CalculatorTest\ScenarioStandard.cs:line 131
Result Message: Initialization method CalculatorTest.ScenarioStandard.Clear threw exception. System.InvalidOperationException: An unknown error occurred in the remote end while processing the command..你知道为什么测试不起作用,为什么在我的断点处没有中断吗?
发布于 2019-09-10 00:07:42
第31行包含“the”测试方法。
驱动程序找不到它想要单击的元素,我认为当发生这种情况时,正在讨论的元素没有显示在屏幕上。
session.FindElementByName("One").Click();尝试在click方法调用之前添加睡眠调用。
System.Threading.Thread.Sleep(5000); https://stackoverflow.com/questions/57856109
复制相似问题