UFT无法识别对象 - 有时候

时间:2016-12-09 10:12:11

标签: automated-tests qtp hp-uft

我有问题,我有一个带静态值的测试用例。 但是当我在第一次尝试时测试应用程序(例如)它是成功的,但是在重新开始测试之后,UFT无法识别某些对象。接下来的5次运行没有问题。

这不依赖于任何对象,这发生在不同运行中的不同对象上。

测试用例由itselfe启动应用程序,因此旧实例或其他程序不应有副作用。

以下是一些示例,我如何访问对象。

通过对象存储库:

if Control.WinObject("ThunderRT6UserControlDC").VbWindow("frmAddress").ActiveX("FarPoint fpCombo 3.0 Control").Exist(2) then
Control.WinObject("ThunderRT6UserControlDC").VbWindow("frmAddress").ActiveX("FarPoint fpCombo 3.0 Control").Click
end if

通过描述:

Dim oDesc 
Set oDesc = Description.Create 
oDesc("text").value= Name
Control.VbButton(oDesc).Click

两者都会导致错误告诉我,该对象不可用。

0 个答案:

没有答案
相关问题