[转贴]随机选取weblist的方法

上一篇 / 下一篇  2007-08-21 10:04:41 / 个人分类: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

我来说两句

我的栏目

日历

« 2024-04-30  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 749
  • 日志数: 3
  • 建立时间: 2007-04-28
  • 更新时间: 2007-08-28

RSS订阅

Open Toolbar