在学习linux内核。有好的资料可以介绍给我。

QTP 获取ToolTip几种方法

上一篇 / 下一篇  2009-09-24 13:29:02 / 个人分类:自动化测试

最近有一朋友问图片tooltip怎么获取!整理了下有以下几个方法

方法1.
' Mouseover
Browser("XXXX").Page("YYYY").Link("Link A").MouseOver
' Wait 1 second to get the tool tip displayed.
wait 1
' Capture the text of the tooltip object
txt= Window("nativeclass:=tooltips_class32").GetROProperty("text")
msgbox txt

方法2.
temp=Brower("name").Page("page").Image("imagename).GetROProperty("alt")
msgbox temp

方法3.
temp=Brower("name").Page("page").Image("imagename).GetROProperty("tooltip")
msgbox temp

google例子
Dim a a=Browser("Google").Page("Google").Image("科幻小说家 H.G. 威尔斯的生日").GetROProperty("alt")
msgbox a

 


TAG: QTP TooTip

 

评分:0

我来说两句

Open Toolbar