I am automating flex projects using qtp, and i met a problem with menubar component: it does not support
itemclick event for its top-level menuitem. for example:
a menubar is like this:
File | Edit | Help
the "Help" menuitem has no submenu, when clicked, it forwards to another page. But when using qtp to record this, it records:
menubar just highlight the "Help" item but not forward to the expected page when replaying the above script.
Does any idea solve this problem? Please help me out.
The app I work with doesn't have any such menu that takes to a diff page, but we have items under menu and this is how we do it
Browser("A").FlexApplication("B").FlexCanvas("main Canvas").FlexMenuBar("myMenuBar").Show "Maintenance"
Browser("A").FlexApplication("B").FlexCanvas("main Canvas").FlexMenuBar("myMenuBar").FlexMenu("Mainte nance").Select "Exports"
There are too many restrictions or less features available with QTP and flex. Sorry couldn't be of any more help.
I am also working on flex application with QTP9.2.which solution you have provided it does work.
I've also done same thing in my application and it works fine.
Please try it.
If it doesn't work please provide your error will give you answer.
this solution can deal with top-level menus that have sub menus. but when come to top-level menus that do not have submenus, it does not work. Assume that there is a top menu "create inquiry", the expected behavior of this menu is that when clicked, it forward to a page/pop up a window that used to create a detail inquiry. QTP cannot deal with this kind actions of menubar, though it can deal with top-level menus that have submenus well. To add a submenu that acts as the top menu may be one solution. Is there any other solutions?