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
Why to use descriptive programming?
Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?
Limitations in QTP?
Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)
How to analyzing test results using quicktest professional (qtp)?
Name the properties you would use for identifying a browser and page when using descriptive programming?
How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?
How to Get the Run-time value of an object under that web app under Test to the local data table sheet of that Action?
how to test load test and block box testing an a web based application pls give ans briefly
Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks
Why we load add-ins in qtp?
I want to configure the OR and library files to a particular QTP test during run time. Note: OR and Library files are located in Quality Center. Is it possible in QTP? Anybody having code?
Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek
is there any addin for remedy user application
What is the extension of qtp local repository?