Highlighted
Absent Member.
Absent Member.
5051 views

How to identify context menu using Qtp?

In java application we have context menu, how does qtp identify the context menu?
How do we select a menu item from context menu? how to add context menu to object repository?
Can we automate context menu and menu items using qtp?

0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

Re: How to identify context menu using Qtp?

Hi,

 

generally, QTP 11.00 should handle java context menus straight forward, except Spy - u can record and replsy on them using the JavaMenu test object. QTP 10.00 handles SWT context menus using the Std package.

 

is there any specific problem?

 

thx

itsik

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: How to identify context menu using Qtp?

Hi, I tried to make QTP recognize the right-click 'Context Menu' using object spy. Then the Context Menu is recognized as 'Window' Class Name. By recording not able to capture te Context Menu. May I please know using QTP 9.5 if Context Menu can be recognized. Thanks and Regards, Raju
0 Likes
Absent Member.
Absent Member.

Re: How to identify context menu using Qtp?


@QTPFlex wrote:
Hi, I tried to make QTP recognize the right-click 'Context Menu' using object spy. Then the Context Menu is recognized as 'Window' Class Name. By recording not able to capture te Context Menu. May I please know using QTP 9.5 if Context Menu can be recognized. Thanks and Regards, Raju

If you go to Tools->Options->Windows Applications->Advanced->Menu... is the option of "Enable recording" checked ? It could also be that the menu is not a standard menu. 

Highlighted
Absent Member.
Absent Member.

Re: How to identify context menu using Qtp?

Hi,

 

Tools->Options->Windows Applications->Advanced->Menu... This option also  checked, But still it not recognising.

Can you please give solution for this?

 

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: How to identify context menu using Qtp?

You could tr something like this (replace the webelement with your object)

 

Browser("X").Page("Y").WebElement("Z").FireEvent "onContextMenu"

 

Or you could try with the "Mercury.DeviceReplay" (you will have to search the forum as I can't remember the syntax for this)

 

Mark Smith.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.