I have a windows based .Net application to be automated. I have a pane in my application which is a container control of class which has many embedded controls within it. One of the controls is WPF.
I have a number of Menus placed horizontally in my application which is identifying as WPFList on the whole ( for ex., if i have 10 menus, wherever I spy it is getting identified as Same object(WPFList with same description properties).Each Submenu under the Main menu is getting identified as individual WPFButton.
Step 1: I have to click the Main Menu. It will display all the submenus.
Step 2: Click the each submenu and verify that the application opened successfully or not.
Currently am facing the below problem in achieving the above scenario,
When i try to record the above scenario, I am getting the below code in QTP,
Window ("windowName").WinObject ("ObjectName").WPFWindow ("WpfWindow").WPFButton ("Wpfbutton").Click (Here, the WPFButton is the Submenu under the Main Menu; no action is recorded for the selection of Main Menu)
While executing the above code, I am getting the error "Object not found...”. This error is because Main Menu is not expanded to display the submenu, where the script is supposed to perform the operation.
Major challenge here is that am not able to make the Main Menu visible/expand for the above action of performing the click operation of the submenu. Submenus are visible on mouse over in manual operation. I experimented all the below operation in QTP to expand/Open the Main Menu and nothing worked out on WPF List,
2) Fire Event not supported.
Fire event not supported - this is because development team used MVVM (Model-View-View Model) command to handle the operation in WPF object (WPFList/WPFButton), so we cannot trigger the fire event as such.
Net Advantage: I confirmed with the development team and they told that they dint use the Net Advantage.
Is anyone faced this issue? Is there any specific way to trigger the event on the WPFList to make it visible for the script to perform the operation on submenu?