手工编写CodedUITest [英] Write CodedUITest by hand

查看:67
本文介绍了手工编写CodedUITest的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在没有构建器的情况下,是否有任何教程来教编写编码的UI测试?动作记录器很好,但是生成的代码无论如何都很难阅读,对我来说也太复杂.我试图通过调用ApplicationUndeTest.Launch()方法来启动AUT(计算器),然后尝试查找要单击的按钮.计算器实际上已启动,但是Mouse.Click()始终会引发null引用异常.这是我的代码:

Is there any tutorial to teach writing coded UI tests without a builder? The action recorder is good, but the generated codes are too difficult to read anyway and too complicated to me. I tried to launch a AUT (Calculator) by calling ApplicationUndeTest.Launch() method, and then trying to find a button to click. The calculator is actually launched, but the Mouse.Click() alway throw a null reference exception. Here is my codes:


推荐答案

请遵循Balagans的网站.基本上,使用记录器生成代码并将其删除.记录器擅长查找和建模控件.如果您想查看我正在处理的项目的结构,可以将其粘贴.
Follow the guidance in Balagans's website . Basically, generate the code using the Recorder and tear it out. The Recorder is good at finding and modeling the controls. If you want to see the structure of the projects I am working on, I can paste them.


这篇关于手工编写CodedUITest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆