07-02-2008, 07:15 PM
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:
...
:all of these fail.
Thanks.
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.