How to access name of a node in a javatree in UFT ? - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: How to access name of a node in a javatree in UFT ? (/Thread-How-to-access-name-of-a-node-in-a-javatree-in-UFT) |
How to access name of a node in a javatree in UFT ? - saniya - 07-25-2018 I have this JaVaTree and i want to access the nodes inside this Javatree using names like "17026-3 Program control unit" instead of indexes. How should i do that ? I am trying the below code but it does not work : Dim itemsCount Dim ProgramName Dim objItem ProgramName = "17026-3 Program control unit" itemsCount = CInt(WpfWindow("Tech Tool").JavaWindow("Program_ECU").JavaTree("Program_Control_Unit").GetROProperty("items count")) Set objItem = WpfWindow("Tech Tool").JavaWindow("Program_ECU").JavaTree("Program_Control_Unit").Object For i = 0 To itemsCount If Trim(CStr(ProgramName)) = Trim(CStr(objItem.getItem(i))) Then objItem.Select(i) msgbox "Success" End If Next I get this error : Object doesn't support this property or method: 'getItem' Line (10): "If Trim(CStr(ProgramName)) = Trim(CStr(objItem.getItem(i))) Then PLEASE HELP! |