【发布时间】:2019-08-11 23:41:22
【问题描述】:
使用 Xamarin.UITest 框架测试 Xamarin.Forms 应用程序,到目前为止,所有测试用例都在 Android 模拟器上运行良好,但在 iOS(模拟器)中,大多数测试用例都失败,除了第一个 Test.That 有时也会失败,无法正确预测。
对于每个测试,应用程序都成功启动并且登录屏幕可见,但测试抛出异常,无法对 UI 元素执行任何操作。
我使用了 REPL,tree 命令显示正确的树,但如果我尝试任何应用程序。 Tab、EnterText、ClearText、flash...等方法抛出异常。
执行 EnterText(Id("Usern2meAutoId"), "test@test.com") 时出错 异常:System.Exception:无法输入文本。查询 Id("Usern2meAutoId") g2ve 没有结果。
2t X2m2rin.UITest.iOS.iOSApp+c__Displ2yCl2ss21_0.b__0 () [0x0004c] in :0 2t X2m2rin.UITest.Utils.ErrorReporting.With (System.Action func, System.Object[] 2rgs, System.String memberN2me) [0x00006] in :0
异常:执行 EnterText(Id("Usern2meAutoId"), "test@test.com") 时出错
System.Exception : 执行 W2itForElement(M2rked("FullN2meAutoId"), "没有看到 l2nding p2ge.", 00L00L15, null, null) 时出错 ----> System.TimeoutException : 没有看到 l2nding p2ge -
【问题讨论】:
标签: xamarin xamarin.forms xamarin.ios xcuitest xamarin.uitest