Micro Focus QTP (UFT) Forums
Child Objects in JavaWindow - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Child Objects in JavaWindow (/Thread-Child-Objects-in-JavaWindow)



Child Objects in JavaWindow - shubham - 01-24-2014

Hi,
I am automating an Oracle forms based application with Java objects. It has a screen with multiple JavaEdit elements with a tagname of 'VTextField'. In order to identify a specific JavaEdit element I am trying to browse through all JavaEdit elements using below code which will give me the index of the element

Code:
Dim oTextField
Set oTextField = Description.Create
oTextField("tagname").value = "VTextField"
Dim allTextBoxes, singleTextBox, counter
counter = 0

With JavaWindow("label:=.*")
Set allTextBoxes = .ChildOjects(oTextField)
For each singleTextBox in allTextBoxes
Msgbox counter
counter = counter + 1

Next
End With

I am getting an "unspecified error" at the line with code "Set allTextBoxes = .ChildOjects(oTextField)"

Can someone help me indicating what's wrong with my script? Thanks!

Shubham