Micro Focus QTP (UFT) Forums

Full Version: Unable to get properties of JavaObject in contextual menu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am trying to check the property of JavaObject in contextual menu of javaTree.
I cant put standard checkpoint in contextual menu. I am comparing value of a Javaobjects in contextual menu but how to check if a particular object exist in contextual menu or not.
I have below method but actual value in replay is coming out to be empty, and test is failing.


Code:
JavaWindow("ENOVIA Portal -").JavaTree("DocumentTreeView$DndVpmJTree").Select Object
JavaWindow("ENOVIA Portal -").JavaTree("DocumentTreeView$DndVpmJTree").OpenContextMenu Object
wait(2)
JavaWindow("ENOVIA Portal -").JavaMenu("Convert to Multi-sheet").CheckProperty "displayed", 0


Now, in above script "Convert to Multi-sheet" object should not appear in order to pass the test.
In results, its showing value of "displayed" as empty value. I tried putting "" also but still no luck.

I have attached screenshot of result.
Please tell me any possible alternatives for this

Thanks
Amit
Use GetROProperty to get the property of context menu and assign to variable and use the particular variable in where ever you want