[原创]随机选取weblist的方法

上一篇 / 下一篇  2007-08-19 13:41:24 / 个人分类:QTP

Function Select_weblist(obj)
   Dim item_count
   item_count=obj.GetROProperty ("items count")
   If  item_count > 0 Then
          Randomize
  Get_Ran=RandomNumber (1,item_count-1)
  obj.Select "#"&Get_Ran
   End If
End Function

把对象传进去,就可以自动选取weblist中的值,在实际操作中特别是针对动态的weblist,而且对流程没有影响的的weblist效果不错,拿出来和大家分享.

 

 


TAG: QTP

 

评分:0

我来说两句

Open Toolbar