Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue in WPF Automation in QTP 11
#1
Not Solved
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.

Automation Scenario

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,

Code:
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,
1) Click/Select
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?

Regards,
Dinesh

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.

When we open the container application, more than 10 window applications will be open by default which we cannot close at any point of the time.

I am using QTP 11. Add-Ins used for this application is ActiveX, Web, Java and WPF.

The problem I am facing here is,

When I Check the Web and WPF Add-Inn in QTP and then if i try to open the application, application is getting crashed and closed.

But application opens up fine when I have Web/WPF add-in checked separately.

Currently I am able to work only in this way, Open the application first and then load the QTP with Web and WPF add-inn, but again the problem here is the Web objects are recognized as WinObject, but WPF object is identifying correctly. In this way, we were able to develop the scripts descriptively, but whenever we execute the scripts with both Web and WPF add-In, application is getting is crashed.

Is anybody faced this issue with WPF Automation? Is there any way to resolve this issue?

Thanks in Advance!
Reply
#2
Not Solved
Hi,

Did you tried descriptive.

some thing like below.

Code:
Set descObj = Description.Create
descObj("regexpwndtitle").Value =<var> & ".*"
descObj("wpftypename").Value = "window"
var =WpfWindow(descObj).Exist(0)
MsgBox var
Reply
#3
Not Solved
Hi Dinesh,

Even i am facing same issue. Please let me know if you are able to solve the issue

Thanks & Regards,
Nithya
Reply
#4
Not Solved
Hi Dinesh,

Am looking for the help on WPF and Test Advatages controls.

Kindly forward if you have any infromation

Thanks & Regards,
Naga
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Issue with UI Automation Addin of UFT 15.0.2 skarthick 0 1,536 02-24-2022, 03:01 PM
Last Post: skarthick
  Error in Code while accessing WPF object Dinesh_cts 1 3,330 11-08-2017, 11:46 PM
Last Post: lotos
  Error on WPF elements Autobot 2 5,421 12-09-2014, 11:27 AM
Last Post: Autobot
  Does QTP/UFT support "Microsoft.Windows.Control" (one type of wpf control)? abhishikth12221 2 3,983 01-22-2014, 06:24 PM
Last Post: abhishikth12221
  QTP WPF Controls rnbhushan 0 4,727 09-18-2012, 12:05 AM
Last Post: rnbhushan

Forum Jump:


Users browsing this thread: 1 Guest(s)