使用网格对网页进行 CodedUI 测试
在工作中我们刚刚开始使用CodedUI,在我们的产品中有很多数据网格,虽然CodedUI UIMap记录器能够挑选出单个元素,但它似乎无法挑选出元素的集合,例如返回一个列表,给出列或行中的每个单元格,或者更有用的是列表列表,因此您可以以对上下文敏感的方式导航数据 - 例如,我可能有兴趣检查第四列是否始终是等于第二个和的总和 第三。
有没有办法在 CodedUI 中进行这种搜索?到目前为止,我遇到的唯一搜索方法是 UIMap 记录器本身使用的搜索方法,它应该只返回单个对象。如果没有这个,我发现很难进行任何特别有用的测试......
At work we have just started using CodedUI, in our product there are a lot of data grids, and while the CodedUI UIMap recorder is capable of picking out individual elements, it does not seem to be able to pick out collections of elements, such as returning a list giving each cell in a column or row, or even more usefully a list of lists, so you can navigate the data in a way that is sensitive to context - I may be interested for instance in checking that the fourth column is always equal to the sum of the second and third.
Is there any way to do this sort of search in CodedUI? So far the only search methods I have come across are those used by the UIMap recorder itself, which should only ever return a single object. Without this I am finding it difficult to make any tests that are particularly useful...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有 方法
UITestControl.FindMathingControls
返回满足您设置条件的元素集合。据我了解,这种方法可以满足您的需要。
There is method
UITestControl.FindMathingControls
which returns collection of elements satisfying conditions you set.As far as I understand this method gives you what you need.