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 customize qtp?
Explain the features and benefits of quick test pro(qtp)?
what is the latest version of QTP? Main difference between 9.2 and 10 version
What is the qtp testing process?
What is QTP scenario.
i need code for how to click on particular mail in utlook mail box .its urjent Thank You Balaji
how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?
How many types of recording facility are available in quicktest professional?
What is the XML file architecture ?
Explain the concept of object repository and how quicktest professional (qtp) recognises objects?
Suggest and Define a solution for an application whose objects are not recognized by UFT?
How many add-ins comes by default with quicktest professional?
Hi, I am using OutputCheckPoint and I am storing the value in the data table. The stored value for column:bedroom:"Bed:4" The another value for column:bathroom:"Bath:2 Full,1 Partial" I need only the no 4 from the first column. I need only the no 2,1 from the second column. I used split array,but it also show array(0) has the value"bed:4" ..... Even though I highlight only 4,It is seleting the full value "bed 4".How can I get only the nos Thank you Uma
How to execute a winrunner script in quicktest professional?
What are the various automation frameworks available in qtp?