Micro Focus QTP (UFT) Forums
Unable to get properties of JavaObject in contextual menu - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Unable to get properties of JavaObject in contextual menu (/Thread-Unable-to-get-properties-of-JavaObject-in-contextual-menu)



Unable to get properties of JavaObject in contextual menu - amit25007 - 12-14-2015

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


RE: Unable to get properties of JavaObject in contextual menu - vinod123 - 12-18-2015

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