Micro Focus QTP (UFT) Forums
right click event in qtp - 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: right click event in qtp (/Thread-right-click-event-in-qtp)



right click event in qtp - sujaravi123 - 01-18-2012

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



RE: right click event in qtp - ravi.gajul - 01-18-2012

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


RE: right click event in qtp - sujaravi123 - 01-23-2012

Thanks Ravi.this works for me


RE: right click event in qtp - sujaravi123 - 01-24-2012

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?


RE: right click event in qtp - ravi.gajul - 01-24-2012

yeah thats correct
Code:
x=object.getRoProperty("abs_x")
y=object.getRoProperty("abs_y")