我的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选项,可以查看对象的运行时属性。

 


TAG: 描述性编程 QTP Run-time属性

 

评分:0

我来说两句

Open Toolbar