我的csdn博客地址: http://blog.csdn.net/blizzardlyk
在描述性编程中使用Run-time属性来定义对象
上一篇 /
下一篇 2010-08-25 10:50:34
/ 个人分类:QTP
使用Run-time属性来定义Web对象,代码如下:
'在普通的属性名之前加入 "attribute/" ,表示引用对象的RO属性。
Set ImgDesc = Description.Create
ImgDesc("attribute/nodeName").Value ="IMG"
ImgDesc("attribute/nameProp").Value = "minimize\.gif"
ImgDesc("attribute/cs").Value = "Minimize"
Set ImgDesc = Description.Create
ImgDesc("attribute/nodeName").Value ="IMG"
ImgDesc("attribute/nameProp").Value = "minimize\.gif"
ImgDesc("attribute/cs").Value = "Minimize"
通过SPY切换到 native properties或者Run-time properties选项,可以查看对象的运行时属性。
相关阅读:
- QTP加载外部文件函数,三种方法比较 (xin_晴, 2010-8-19)
- QTP---用户指南 (fengzhulin, 2010-8-11)
- qtp使用记录(不断更新) (fengzhulin, 2010-8-23)
- QTP中的Description对象详解 (xin_晴, 2010-8-26)
- QTP运行时,动态加载外部共享对象库 (blizzardlyk, 2010-8-25)
- 使用QTP与Winrar,压缩指定的文件 (blizzardlyk, 2010-8-25)
- QTP中判断Action运行是否超时 (blizzardlyk, 2010-8-25)
- 在QTP中实现语音功能 (blizzardlyk, 2010-8-25)
- QTP中获取当前系统分辨率 (blizzardlyk, 2010-8-25)
收藏
举报
TAG:
描述性编程
QTP
Run-time属性