QTP同步点

上一篇 / 下一篇  2010-08-13 16:04:28 / 个人分类:QTP

同步点就是在等待的时间上比较灵活,脚本会在规定时间内不断的去检查,所同步的对象有没有出现,一但出现,脚本就继续往下执行.不需要等完所有规定时间.如果在规定的时间内,所要同步对象还没有出现,那就提示超时的错误信息。
其格式如下:
object.WaitProperty (PropertyName, PropertyValue, [TimeOut])
说明:waitproperty  后面是接属性名  属性值
例如:
Window("Test").Static("Status:").WaitProperty "text", "Ready", 30000
如下实例:
Browser("xxxxxxx 版本号:V4.1.0.2").Page("xxxxxxx").Frame("main_center_4").Image("flowButtonLine2").FireEvent "onmouseover"  
需要插入同步点修改后如下:
Browser("xxxxxxx 版本号:V4.1.0.2").Page("xxxxxxx").Frame("main_center_4").Image("flowButtonLine2").WaitProperty "flowButtonLine2",true,100000


TAG:

 

评分:0

我来说两句

日历

« 2024-05-19  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 8775
  • 日志数: 15
  • 图片数: 1
  • 建立时间: 2010-03-02
  • 更新时间: 2011-10-10

RSS订阅

Open Toolbar