使用网格对网页进行 CodedUI 测试

发布于 2024-12-02 22:24:16 字数 282 浏览 4 评论 0原文

在工作中我们刚刚开始使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

木落 2024-12-09 22:24:16

方法 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文