在WEB页面加载后对象的复用

2010-03-09  胡睿 

在WEB页面加载后对象的复用
systemutil.Run "iexplore.exe"
Set oBrowser = Browser("micClass:=Browser")
Set oEdit = oBrowser.Page("micClass:=Page").WebEdit("name:=wd","index:=0")
oBrowser.Navigate "www.baidu.com"
With oEdit
    .Set "zzxxbb112"
    .Submit
End With
oBrowser.Sync
oEdit.init
oEdit.Set "http://blog.csdn.net/zzxxbb112"
 
执行以上脚本后成功做到了在WEB页面加载后对象的复用。
obj.init  ----  此方法为QTP的隐藏方法,在帮助文档中都没有任何的介绍,用于重新同步页面上的测试对象。我们可以通过使用VS2008改装过的DEBUG引擎来查看此方法。
178°/1784 人阅读/0 条评论 发表评论

登录 后发表评论