Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why to use descriptive programming?

1012


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?

1097


Limitations in QTP?

2165


Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)

1881


How to analyzing test results using quicktest professional (qtp)?

1040


Name the properties you would use for identifying a browser and page when using descriptive programming?

1015


How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?

3978


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?

4605


how to test load test and block box testing an a web based application pls give ans briefly

1843


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

1874


Why we load add-ins in qtp?

1106


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?

1840


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

2062


is there any addin for remedy user application

2273


What is the extension of qtp local repository?

1020