Descriptive Examples

' Script to Close the Recent browser opened


Dim d,brlist,idx
Set d=Description.Create
d("micclass").value="Browser"
Set brlist=Desktop.ChildObjects(d)
idx=brlist.count-1

Browser("creationtime:="&idx).close

Set d=Nothing
Set brlist=Nothing

'''' VBScript to Display All the Properties of All the objects in WebPage
Set d=Description.Create
Set App = CreateObject("QuickTest.Application")
Set qtIdent = App.Options.ObjectIdentification
qtIdent.ResetAll
set objList=browser("micclass:=Browser").page("micclass:=Page").ChildObjects(d)
For i=0 to objList.count-1
  objList(i).highlight
  oClassName=objList(i).getroproperty("micclass")
  Set qtObject = qtIdent.Item(oClassName)
  set PropColl=qtObject.AvailableProperties
  print "*******************************************************"
  For oPropCount=1 to PropColl.count
      print PropColl.item(oPropCount) & ":="& objList(i).getroproperty(PropColl.item(oPropCount))
  Next
  print "*******************************************************"
Next

Comments