Micro Focus QTP (UFT) Forums

Full Version: Right click on the javaobject
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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"
I am getting error 'Object does not support this property or method ' for the code .