Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
JavaTree
#7
Solved: 11 Years, 4 Months, 4 Weeks ago
I think you should use the GetROProperty and assign the get value to a string which will be used in another part. I will try but not sure if it will work, you'll need to adapt the code a little, I does not worked with java applications, and I don't know which are the objects' properties and their values. See next:


Code:
Dim obj_Property1, obj_Property, obj_Property2, obj_Value1, obj_Value2

Set obj_Value1 = JavaWindow("XXX_1").JavaTree("obj_JavaTree1").(GetColumnValue)
Set obj_Value2 = JavaWindow("XXX_1").JavaTree("obj_JavaTree1").(GetColumnValue)
- I'm not sure if GetColumnValue is the right method, maybe you should use: GetItem, to get you value for the specified node, or GetRoProperty.
GetColumnValue returns the text from the specified column in the specified node in the tree.
GetItem returns the value of the node specified by the index.


Code:
Public Function WebElement (obj_Property1, obj_Property2, obj_Value1, obj_Value2)
Set obj_JavaTree2 = Description.Create
    obj_JavaTree2 ("Class Name").value = "WebElement"
    obj_JavaTree2 (obj_Property1).value = obj_Value1
    obj_JavaTree2 (obj_Property2).value =obj_Value2

If JavaWindow("XXX_2").JavaTree("obj_JavaTree2").Exist Then
Reporter.ReportEvent micPass, "The object found", "The java tree object is found under the second Java Window"
Else
Reporter.ReportEvent micFail, "The object not found", "The java tree object with " & obj_Property1 & "=" & obj_Value1 & " and " & obj_Property2 & "=" & obj_Value2 " is missing from the second java Window."
End Function

I don't realy understand what do you mean by saying: to drop it in another tree structure. Maybe you mean to check if it exists under another tree?!
Reply


Messages In This Thread
JavaTree - by perplexed - 05-20-2011, 08:02 PM
RE: JavaTree - by perplexed - 05-25-2011, 10:56 AM
RE: JavaTree - by lotos - 05-25-2011, 07:49 PM
RE: JavaTree - by perplexed - 05-31-2011, 08:09 PM
RE: JavaTree - by lotos - 06-01-2011, 12:38 PM
RE: JavaTree - by Pindaruk1 - 06-20-2011, 01:59 PM
RE: JavaTree - by lotos - 06-20-2011, 04:30 PM
RE: JavaTree - by Pindaruk1 - 06-22-2011, 04:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to access name of a node in a javatree in UFT ? saniya 0 1,808 07-25-2018, 06:00 PM
Last Post: saniya
  Javatree Problem Omkar87 2 4,979 03-02-2012, 03:09 PM
Last Post: sshukla12
Question JavaTree - Not able to click final links scsvel 1 3,035 01-30-2012, 03:34 PM
Last Post: scsvel

Forum Jump:


Users browsing this thread: 3 Guest(s)