现有控件是否返回现有false?选择/聚焦窗口 [英] Does not Existing Control return Existing false? And Select/Focus a Window

查看:71
本文介绍了现有控件是否返回现有false?选择/聚焦窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试图验证屏幕上是否存在控件,我在其上使用了断言:

Trying to verify that a Control exists on the screen, I used an assertion on it:

Exists Equal false

Exists Equal false

但是我的问题是:如果Controll不存在,它可以返回这个值吗?

But my question is: If the Controll does not Exist, can it return this value?

 

我的第二个问题是,如果有一个简单的积极/专注/带到前面的方式 运行应用程序窗口?

My second question is if there is a easy way to activete/focus/bring to the front  running application window?

 

还有一个:

在订购的测试中我可以说,如果发生错误,测试不应该停止。

In ordered Test I can say, that If an error occurs the tests should not stop.

有没有办法将此选项设置为单一测试方法,

Is there a way that this option is set to only a Single Test Methode,

所以是否执行了所有记录的操作,如果有问题,请转到测试方法中的下一步?

so that all recorded actions are executed and if there is a problem just move to the next step within the Test Method?

推荐答案

是。如果控件不存在,它将返回false。但是,如果控件只是隐藏但仍然有效,它将返回true。

Yes. It will return false if the control does not exists. However, it will return true in cases where the control is just hidden but still valid.

编码的UI测试将始终使应用程序在尝试对其执行操作之前进行聚焦。

Coded UI Test will always bring the application to focus before trying to perform actions on it.

对于您的上一个问题,您自己会捕获异常,以便继续进行测试。

For your last question, you've catch exceptions yourself in order for the tests to proceed.

Vinoth。


这篇关于现有控件是否返回现有false?选择/聚焦窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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