Welcome, Guest. Please login or register.
Login with username, password and session length

 
Advanced search

16632 Posts in 4351 Topics- by 28387 Members - Latest Member: clandreth
 

Pages: [1]   Go Down
Print
0 Members and 2 Guests are viewing this topic.
Author Topic: How to Select a given path in a Java Tree    (Read 798 times)
akontham
User
*
Offline Offline

Posts: 15


« on: May 29, 2009, 10:33:18 AM »

Hi I am beginner to QTP, I am facing a problem in selecting a given path in the Java Tree. My requirement is to pass a path as parameter ex : RootNode|Node1|Value2 and then Value2 is to be selected in the Tree.

I tried to retrieve the items of JavaTree but those are being displayed as "#0", "#0,#0,#1".

But we cant expand by sending #values, my requirement is to select by sending the Names present in the tree.

I request you all to kindly do the needful at the earliest.

Logged
gurvinder dhillon
FRProject
User
*
Offline Offline

Posts: 15

Software Professional


« Reply #1 on: August 27, 2009, 11:09:05 PM »

I think QTP is recording your java objects(java tree) by its index.
Try changing the setting and it should work.

Open QTP Options window.
Select Java Tab in that.
Change the record items mode to "By Name".

This should work.

OR try this

msgbox JavaWindow("Jwnd").JavaTree("JTree").GetROProperty("value")
and then try selecting by name.
Logged
Pages: [1]   Go Up
Print
Jump to: