Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Runtime java object arrays
#1
Not Solved
Version: QTP 9.5 + Java add-in
Application tested: Eclipse RCP

I have noticed the Object property gives me access to the underlying Java object. This seems an interesting capability, but I couldn't see how to retrieve items from java arrays. What is the syntax for that?

For instance:

Code:
JavaTree("Tree").Object.getSelection() returns (in Java) a TreeItem[], how can I access its elements in the vb script, as well as the array length? I couldn't find a syntax that works:
JavaTree("Tree").Object.getSelection()[0]
JavaTree("Tree").Object.getSelection()(0)
JavaTree("Tree").Object.getSelection().get(0)
JavaTree("Tree").Object.getSelection().item(0)
...
:all of these fail.

Thanks.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Collecting Objects And Object State At Runtime zunebuggy 3 1,717 11-22-2017, 02:37 PM
Last Post: supputuri
Exclamation UFT is not finding object in runtime but able to locate the object from repository amar.vallapreddy 1 2,728 02-25-2014, 02:22 PM
Last Post: guin.anirban
  Can we access a table element in Script at runtime without a corr. test object? sepgs2004 1 3,043 10-14-2013, 07:05 PM
Last Post: anil2u
  Object not found when creating an object during runtime riechan 2 3,049 07-24-2012, 07:30 AM
Last Post: riechan
  How to convert three arrays into just ONE array? Arena 2 4,878 04-10-2012, 09:35 AM
Last Post: Arena

Forum Jump:


Users browsing this thread: 1 Guest(s)