QTP的一些小用法

上一篇 / 下一篇  2008-08-28 10:57:42 / 个人分类:QTP

1. 通过IE打开URL。

   'testUrl  = "http://www.baidu.com/" 也可以参数化testurl

   testUrl = datatable.Value("testUrl",dtLocalSheet)

   SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE",testUrl

2. GetROProperty, Instr用法

 Errorinfo = Browser("Browser").Dialog("Microsoft Internet Explorer").WinButton("OK").GetROProperty("attached text")
 'msgbox  Errorinfo
 Pos0 = Instr(1,Errorinfo,"Record already exists.")

 If Pos0 > 0 Then

  action_Result = 0

  exitaction(action_Result)

 else

  action_Result = -1  

  exitaction(action_Result)       

end if      


TAG: QTP

 

评分:0

我来说两句

我的栏目

日历

« 2024-04-30  
 123456
78910111213
14151617181920
21222324252627
282930    

我的存档

数据统计

  • 访问量: 606
  • 日志数: 1
  • 建立时间: 2008-08-28
  • 更新时间: 2008-08-28

RSS订阅

Open Toolbar