Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to access name of a node in a javatree in UFT ?
#1
Not Solved
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!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Exe invoked through UFT is unable to access IIS and SQL Server service bkdevise 0 2,146 08-25-2015, 05:49 PM
Last Post: bkdevise
  Working with SAPGuiTree - Search and Activate Node Ankesh 0 6,359 10-15-2012, 05:15 PM
Last Post: Ankesh
  Javatree Problem Omkar87 2 4,909 03-02-2012, 03:09 PM
Last Post: sshukla12
Question JavaTree - Not able to click final links scsvel 1 3,014 01-30-2012, 03:34 PM
Last Post: scsvel
  WinTreeView - Trouble in extracting the content of the Node Gurushankar 0 3,633 11-21-2011, 07:15 PM
Last Post: Gurushankar

Forum Jump:


Users browsing this thread: 1 Guest(s)