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 many lines of code in each script of QTP?
Hi Friendss..., can any body help me.. 1. Tell me your achievements(Technically)..? 2. Tell me your strengths(Technically) and weakness(Technical)..? 3. Why are you looking for change..?
How to add object to object repository in qtp9.0 Suppose for brower yahoo home page
Which environments are supported by hp qtp?
What is the differences between image check point and bit map check point?
What are the recording modes in qtp?
Why to use descriptive programming?
In qtp, how you can remove the spaces from string?
What is recovery scenario manager? When you go for recovery scenario manager?
Differences between text and test area checkpoints?
Where to use function or action?
For QTP Test Engineer, What is his contribution to the Project? Means, As as automation test engineer what is his role in the current project?
What is checkpoints for quicktest professional (qtp)?
How many tabs are available in debug viewer pane?
Should have experience in framework means?