Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
right click event in qtp
01-18-2012, 12:08 PM
Post: #1
right click event in qtp

can somebody help in scripting right click of an object in qtp.Itried the below both.but they are nt working.


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
Find all posts by this user
Quote this message in a reply
01-18-2012, 07:59 PM
Post: #2
RE: right click event in qtp
Please try the below 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
Find all posts by this user
Quote this message in a reply
01-23-2012, 01:08 PM
Post: #3
RE: right click event in qtp
(01-18-2012 12:08 PM)sujaravi123 Wrote:  can somebody help in scripting right click of an object in qtp.Itried the below both.but they are nt working.


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

Tnaks Ravi.this works for me
Find all posts by this user
Quote this message in a reply
01-24-2012, 11:46 AM
Post: #4
RE: right click event in qtp
(01-18-2012 12:08 PM)sujaravi123 Wrote:  can somebody help in scripting right click of an object in qtp.Itried the below both.but they are nt working.


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

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?
Find all posts by this user
Quote this message in a reply
01-24-2012, 11:48 AM
Post: #5
RE: right click event in qtp
yeah thats correct
x=object.getRoProperty("abs_x")
y=object.getRoProperty("abs_y")
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  QTP Event Driven approach bostonma 0 945 12-13-2010 10:32 PM
Last Post: bostonma
  Verifying if "onmouseover" - event has been activated QADBA 2 713 07-31-2008 07:57 PM
Last Post: kishoreinchennai
Question Select Event is not working properly MMK 1 567 04-06-2008 12:58 PM
Last Post: Ankur

Forum Jump:


User(s) browsing this thread: 1 Guest(s)