对产品质量来说,不是100分就是0分
校验对象是否存在object.exist
上一篇 /
下一篇 2007-03-07 11:38:36 / 天气: 晴朗
/ 心情: 高兴
/ 个人分类:QTP
查看( 1622 ) /
评论( 5 )
E^&J0s,Z0除了用校验点来确认相符的对象是否存在外,也可以用object的exist属性来判断对象的存在与否.51Testing软件测试网k0B#U C[|0`io
51Testing软件测试网pi0j7og@ C4CY语法:Object.Exist([Timeout])
8i8NZP TW;|R051Testing软件测试网v1L%e:](d u`}.k(L'F|描述:51Testing软件测试网_%g'cCOd
[ H0rB#TV,nF/U0
Argument51Testing软件测试网PM S$d\2g | Type51Testing软件测试网
~J:??2mNX%jp ]2J | Descrīption51Testing软件测试网|
S.o\Y0gkaE |
---|
Timeout | Number | Optional.The length of time to search for the objectbefore returning a True or False value. - If a timeout value is specified, QuickTest waits until it finds theobjector until the timeout is reached.
- If the value0is specified, the method returns the True or False value immediately.
- If no value is specified, the value specified in the Test Settings dialog box for theObjectSynchronization Timeoutis used for tests. For business components, the pre-defined value of 20 seconds is used.
For more information on theObjectSynchronization Timeout, refer to theQuickTest Professional User's Guide. |
/A3r7N6BT&V0f7@&?3|(M
['~0实例:
k jc8Ged0/tv#vg3\M9`r0Dialog("Login").Activate51Testing软件测试网b#} aq!C
Dialog("Login").WinEdit("Agent Name:").Set "training"
(A&QHro'Abl0Dialog("Login").WinEdit("Agent Name:").Type micTab
V1I-~6DLpV U;p.b0if Dialog("Login").WinEdit("Password:").Exist Then51Testing软件测试网
v8M^1H#l)n
Reporter.ReportEvent micDone,"存在","控件存在"
1R![2Az.r Y0 Dialog("Login").WinEdit("Password:").SetSecure "429376f06698f739df8bb1c09eab3d78dee316f7"51Testing软件测试网c1~,M7e,{
@
else51Testing软件测试网9f&F8oQt?i]I4a
Reporter.ReportEvent micDone,"不存在","控件不存在"51Testing软件测试网2o:h'_G7r
End If
wkY pf051Testing软件测试网&C:niA9Q@i*ni8W
X2q+V!z5]a%z'X&Cd0
MSq[y051Testing软件测试网d2t*^PCC|-U"|
0W$Rj3Z9_H wp7c0
论坛模式
推荐
收藏
分享给好友
管理
TAG:
QTP
Object
exist
对象存在
-
红狐发布于2007-03-09 16:49:36
-
恩,不错,总结的挺好,再接再励!软件测试 - 软件测试论坛 - 软件缺陷跟踪 - 软件配置工具 - 测试用例设计 - Web测试 - 自动化测试工具KfS)fjul
Fight!!
-
alanxzg发布于2007-05-14 11:06:07
-
恩,不错,总结的挺好,再接再励!
-
milan330330
发布于2007-05-14 17:07:35
-
谢谢 ~~学会了~~呵呵
-
kheng-ling
发布于2007-06-13 18:51:10
-
谢谢
-
terrylight发布于2007-06-14 10:47:35
-
学习收下了