Micro Focus QTP (UFT) Forums

Full Version: view child objects
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Ankur,

following is my script to view all the childobjects. "Object doesn't support" error occur in For loop. can you help on this

Code:
Set Obj_Desc=Description.Create
Obj_Desc("html tag").value = "INPUT"

Dim allTextbox, sign

Set allTextbox = Browser("Login").Page("Login").ChildObjects(Obj_Desc)

For each sing in allTextbox
      msgbox sing.Name
Next
Hi Arun,

Try with below code ...

Code:
Set Obj_Desc=Description.Create
Obj_Desc("html tag").value = "INPUT"

Dim allTextbox
Set allTextbox = Browser("Login").Page("Login").ChildObjects(Obj_Desc)
allTextbox_Cnt=allTextbox.count

For i=0 in (allTextbox_Cnt-1)
  msgbox allTextbox(i).GetRoProperty("Attached Text")
Next

The script will work fine.