您的位置:首页 > 编程语言 > Qt开发

【软件自动化测试-QTP实战技能 22】== QTP_DP_for the DeskTop objects

2010-11-22 14:28 691 查看
1:

eg:

For example, this will input all the text fields within a gaven page:

Dim oDesc

Set oDesc = Description.Create



oDesc("micclass").Value = "WebEdit"



Dim oChildren

Dim i



Set oChildren = Browser("index:=0").Page("index:=0").ChildObjects(oDesc)



For i = 0 to oChildren.Count - 1

oChildren.Item(i).Set "input value"

Next



2:

eg:



The .ChildObjects command can be combined with the Desktop object. to run through all the top-level

windows and applications.



For example, this will hightlight every opened Notepad window.



Dim oDesc

Set oDesc = Description.Create



oDesc("nativeclass").Value = "Notepad"



Dim oChildren

Dim i



Set oChildren =Desktop.ChildObjects(oDesc)



For i = 0 to oChildren.Count - 1

oChildren.HighLight

Next
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐