Highlighted
Absent Member.
Absent Member.
13474 views

QTP to recognize Toolbar and menu items

We are using Quicktest Professional 9.5 to test an MFC (Visual Studio 8 C++) application.
I am facing the problem that when for example, I click in the main menu "file" and then "properties" QTP recognizes only the file dropdown as one object. The different items it does not recognize and when I run the test, it would click simply in the middle of the dropdown.

The same problem is with the toolbar. It is recognized as one object, clicks to the different buttons don't do anything.

The dropdown menu is recognized as an "XTPPopupBar" and the toolbar as an "XTPToolbar".
Can you suggest a workaround?
Thanks & regards

 

 

P.S. This thread ahs been moevd from Quality Center Support and News Forum to Unified Functional Testing (formerly QTP) News and Support Forum. - Hp Forum moderator

0 Likes
10 Replies
Highlighted
Absent Member.
Absent Member.

Re: QTP to recognize Toolbar and menu items

Did you try high level recording? Change the settings in tools -> web event recording configuration to high and try.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: QTP to recognize Toolbar and menu items

Thanks for your reply.
However, we are not testing a web application. It's a windows application. This also implies that there is no Web Event Recording Configuration in tools.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: QTP to recognize Toolbar and menu items

Hi,

There is way to extend QTP's capabilities to extend support for Window's based application.

You can refer to Addin help file. (Under testing windows based application.)

If you need that PDF, drop in your mail...I will share..as it >1MB

Rgds,
Shiva
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: QTP to recognize Toolbar and menu items

Hi Shivaram,

that would be nice,
my email address is kpohl@plansoft.de

Could you also give a hint where to look in that document?

Regards, Karina
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: QTP to recognize Toolbar and menu items

Karina,

use the below code snippet and see how it goes.
VbWindow("MainWindow").WinMenu("Menu").Select "File;Open..."
The Option "Open" in a File menu could be handled as "File;Open" or "File;Properties" for your case.

regards,
Rajan
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: QTP to recognize Toolbar and menu items

Hi,

I also having a problem in recording menu. when I record the web application it records user name and pass word, then select menu item, but it didn't record in the application.
why is that?

if any one have an idea please replay. thanks

Amilar
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: QTP to recognize Toolbar and menu items

Hi,

For web based menu scripting we have to identify the tool bar objects recognition through QTP .. the following is piece of code which I used as part of selecting menu item in internet explorer version 6.

Browser("CreationTime:="&CTime+1).WinToolBar("regexpwndclass:=ToolbarWindow32","index:=3").Press "&File"
Browser("CreationTime:="&CTime+1).WinToolBar("regexpwndclass:=ToolbarWindow32","index:=3").Type "A"


the above code is used to click "SaveAs" option in "file" menu
here in WinToolBar object as part of "index" prperty you can find the "file" object at "index=3"(which i checked through checking all the indices) and the same way you can change the index and seed the object you deserved.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: QTP to recognize Toolbar and menu items

Two ToolbarWindow32 objects are found on the same page, the following code are execauted, but I cound not grab the top of Tool Bar menu.

 

For i = 1 To 40 Step 1
Browser("creationtime:=1").WinToolbar("regexpwndclass:=ToolbarWindow32","text:=","window id:=0","index:=" & i).highlight    
Next

 

How to handle this issue?

 

Thanks,

 

 

0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: QTP to recognize Toolbar and menu items

This is a very old thread I would suggest you start a new thread with your issue.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: QTP to recognize Toolbar and menu items

And I suggest that you start that new thread in the forum that is actually dedicated to QTP.
http://h30499.www3.hp.com/t5/Functional-Testing-QTP/ct-p/sws-Fun_Test

This forum is for ALM/QC. The experts on QTP are looking at the QTP-specific forum.
[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
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.