QTP LR JSP ORACLE

获取页面所有对象

上一篇 / 下一篇  2009-08-16 14:31:06 / 个人分类:QuickTestProfessional

SystemUtil.Run "C:\WINDOWS\system32\calc.exe","","C:\WINDOWS\system32","open"

HightLight_All_Object Window("regexpwndclass:=SciCalc").WinButton("text:=[0-9]")

Function Get_All_Runtime_Objects(TestObject, RuntimeObjects)

       Dim Parent, Desc, Props, PropsCount
       If IsEmpty(TestObject.GetTOProperty("parent")) Then
              Set Parent = Desktop
       Else
              Set Parent = TestObject.GetTOProperty("parent")
       End If

       Set Desc = Description.Create
       Set Props = TestObject.GetTOProperties
       PropsCount = Props.Count - 1
       For i = 0 to PropsCount
              Desc(Props(i).Name).Value = Props(i).Value
       Next
          
       Set RuntimeObjects = Parent.ChildObjects(Desc)
       Get_All_Runtime_Objects = RuntimeObjects.Count
End Function


Function HightLight_All_Object(TestObject)
        Dim allRuntimeObjects
        Dim objIndex, objNum
        objNum = Get_All_Runtime_Objects(TestObject, allRuntimeObjects)
        For bjIndex = 0 to ObjNum-1
          allRuntimeObjects.Item(objIndex).click
        Next
End Function

TAG:

 

评分:0

我来说两句

日历

« 2024-05-03  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 71552
  • 日志数: 117
  • 图片数: 1
  • 文件数: 1
  • 建立时间: 2007-05-07
  • 更新时间: 2011-06-16

RSS订阅

Open Toolbar