I believe you are asking about how to do a right click using QTP.
Unlike the other buttons on the keyboard, I have observed that the
right click button is little different, it doesn't always work well
with QTP (correct me if I am wrong ! ) .. you could try the
following ..

You could always use 'sendkeys' on the object to mimic the keyboard
operations.

1. Try this :

-----------------------------------------------------------------------------------------
set WshShell = WScript.CreateObject("WScript.Shell")

Window("").WinObject("").Activate

WshShell.SendKeys("+{F10}")
-----------------------------------------------------------------------------------------

Or,

2. If it's a standard object, you could get the values of x and y and
do a 'Object.Click' / 'Window.click'on those co-ordinates, and use
micRightBtn as the option. You could also do the same by creating the
DeviceReplay object. Google it out if you need more information.

3. There is one other solution, which uses a dll (I believe
csolib.dll), you would need to use extern object, register it, and you
could again use the sendkeys to send a standard key for the right
click button on the keyboard. I don't recollect it well right now
though. I can get back on this some point later.

I hope this helps you out.

Thanks,
Abhijeet


On Mar 30, 4:21 pm, Serene Tan <[email protected]> wrote:
> Hi ,
> My guess, is to object spy, I hope I am correct.
>
> rgds
> Serene
>
> Date: Tue, 29 Mar 2011 18:54:36 -0800
> Subject: Solve the query..
> From: [email protected]
> To: [email protected]
>
> Hi All,
>  I faced a query in the intw...
>  Right click on the object n do some operation,how to do that?
>  By using QTP/VB-Script....
>  Thanks in Advance.
>
> --
>
> Vamsi Reddy
> 09618272979
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/MercuryQTP?hl=en                             
>             

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to