Micro Focus QTP (UFT) Forums
Right click on the javaobject - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Right click on the javaobject (/Thread-Right-click-on-the-javaobject)



Right click on the javaobject - Shridevi.Salagare - 04-30-2012

in one operation I have to rightclick on the javaobject I tried below approaches but didnt work.
1.
Code:
JavaWindow("").JavaObject("").GetROProperty("x")
y = JavaWindow("").JavaObject("").GetROProperty("y")
JavaWindow("").JavaObject("").Click x,y,"RIGHT"
2.Used absolute x,y instead of normal still doesnt work fine.

Please provide solution.


RE: Right click on the javaobject - ssvali - 05-02-2012

Try this :-

Code:
Set SelectionPath = Javawindow("").JavaObject("").Object.GetSelectionPath()
Set rect = Javawindow("").JavaObject("").Object.GetPathBounds(SelectionPath)
x=rect.x
y=rect.y
Javawindow("").JavaObject("").Click Cstr(x),Cstr(y),"RIGHT"



RE: Right click on the javaobject - Shridevi.Salagare - 05-04-2012

I am getting error 'Object does not support this property or method ' for the code .