Micro Focus QTP (UFT) Forums

Full Version: right click event in qtp
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
can somebody help in scripting right click of an object in qtp.Itried the below both.but they are nt working.


Code:
Browser("Arbitron Cross-Platform").Page("Arbitron Cross-Platform").WebTable("test_script").click, micRightBtn


Browser("Arbitron Cross-Platform").Page("Arbitron Cross-Platform").WebTable("test_script").Fireevent, click,micRightBtn
Please try the below code
Code:
Setting.WebPackage("ReplayType") = 2 ' This lines changes the run mode as Analog
Browser("Arbitron Cross-Platform").Page("Arbitron Cross-Platform").WebTable("test_script").FireEvent "onclick",6,126,micRightBtn


(6,126) ---coordinates where right click has to happen.
Please change according to your need.

Regards,
Ravi
Thanks Ravi.this works for me
Hi ravi,

Can you please let me know how to get the x,y coordinates for firevent method.

is it related to abs-x,abs-y property of the require attributes?
yeah thats correct
Code:
x=object.getRoProperty("abs_x")
y=object.getRoProperty("abs_y")