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 should we give deliver good quality software?

1623


desribe a situation where u faced a stressful situation and how did u cope with it

1402


How to handle dynamic objects in quicktest professional (qtp)?

542


write the vb script for call to new action in qtp?

1851


How to check which add-ins are associated with a test in qtp?

578






Hi ,Can any one pleas explain how to test splash objects using QTP?

1895


What are the data types in qtp?

661


Tell me one scenario, the complex functionality you have automated in your project?

1471


Is it possible to call from one action to another action in qtp?

552


how to know no.of mails in our g mail by using vb-script

1771


I AM TRYING PORT CODE FROM WINRUNNER TO QTP AND DON'T KNOW TO HOW TO CHECK THE ERRORS. IN WINRUNNER FUNCTION RETURNS EIGHER 0 OR -1 AGAINST WHICH RESULT CAN BE MADE PASS OR FAIL BUT IN QTP I DON'T SEE FUNCTIONS RETURNING ANY VALUE. APPRECIATE IF ANYONE COULD HELP ME CONVERTING FOLLWOING WINRUNNER CODE TO QTP. set_window("Customer Service"); rc = web_obj_get_text("Summary","#2","#4",ssn,""," ",1); if (rc != E_OK) { report_msg("[GetSubscriberSummary] Could Not get subscriber SSN; rc = "&rc); myRC = rc; } else { ssn = StripBlank(ssn); if (DEBUG) report_msg ("[GetSubscriberSummary] SSN: "&ssn); }

1678


how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer

1438


In order to select an automation tool for automating ur application, what r the things u need to consider? For eg i will go for automation; 1) When there is a lot of retesting and regression testing. 2) Return on investments. 3) Whether the tool supports the appln. 4)--------------, etc. Pls give me more number of points because my answer did not satisfy the interviewer. Very urgent pls

1440


What is the difference between call to existing action and copy of an action?

597


Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak

1612