How to record right click of a context menu and click on the
selection ?
Answer Posted / amarendra kothuru
We cannot record the right click operation. But we can
achieve this by using below script.
Set menu=browser("MSN.com").Page("MSN.com").Image("F430 (©
Ferrari S.p.A.)")
idx=3 'This var. points the which option to select in the
right click menu. This var. is always the option+1 value.
Ex. If u want to select the second option then the var.
should have the value 3.
Set obj = CreateObject("Mercury.DeviceReplay")
Set WshShell = CreateObject("WScript.Shell")
'Get the absolute coordinates of the ibject
absx = menu.QueryValue("abs_x")
absy = menu.QueryValue("abs_y")
obj.MouseClick absx, absy, 2
'Optional wait statement
wait 3
For i = 1 To idx-1
WshShell.sendkeys "{DOWN}"
Next
WshShell.sendkeys "{ENTER}"
Set WshSEll = nothing
Set obj = nothing
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How to remove associated function library?
I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...
Is it possible to switch between recording modes during a test creation?
Explain in brief about the quicktest professional (qtp) automation object model?
What is regular expression?
How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?
How can I change object description or check point values in qtp?
What is the diff between image and bitmap check point?
what is the difference between rational rose and QTP? WHICH TOOL IS BETTER TO LEARN? PLEASE SEND ME AT sana_50218@yahoo.com sandeep@epuratech.com
What is a checkpoint? How many check points are there in qtp?
What is quicktest professional (qtp)?
Hi we are running tests remotely from quality center and pushing tests into qtp boxes remotely, and it does execution but while uploading results back into quality center it hangs in qtp box.If any one come across similar problem, please send me details how to handle this. Thanks kris
how could i download qtp in which i get add-in support for 'oracle' is there any way to get it? i finding but not getting pls help me out :)
Why to use descriptive programming?
Hi All, How to get repeated word in string . Thanks Balaji