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

 
Advanced search

18468 Posts in 4831 Topics- by 32605 Members - Latest Member: ankit
 

AdvancedQTP forums have been nominated as a finalist in ATI’s 2nd annual automation honors awards!

We’d like to thank you for your continued support and participation, and urge you to hurry and vote.

Make you voice count! 


Pages: [1]   Go Down
Print
0 Members and 1 Guest are viewing this topic.
Author Topic: How to Select a given path in a Java Tree    (Read 1026 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: