Amina
Amina

Reputation: 682

QTP UFT flight reservation Cannot identify the object "HPE MyFlight Sample Applicatio"

I'm trying to record a scenario using UFT QTP with fight sample application. I installed WPF add-on using this tutorial https://www.youtube.com/watch?v=fWmfmqzW35w

It was installed successfully . But after recording, I'm getting a code with no wpf objects.

Window("HPE MyFlight Sample Applicatio").Click 203,223
Window("HPE MyFlight Sample Applicatio").Type "john"
Window("HPE MyFlight Sample Applicatio").Click 216,280
Window("HPE MyFlight Sample Applicatio").Type "hp"
Window("HPE MyFlight Sample Applicatio").Click 186,348
Window("HPE MyFlight Sample Applicatio_2").Close

After executing the code I'm getting this error :

Cannot identify the object "HPE MyFlight Sample Applicatio" (of class Window).
Verify that this object's properties match an object currently displayed in your application.


Description 


Cannot identify the object "HPE MyFlight Sample Applicatio" (of class Window).
Verify that this object's properties match an object currently displayed in your application.

Object's physical description:
regexpwndtitle = HPE MyFlight Sample Application
regexpwndclass = HwndWrapper[FlightsGUI.exe;;a3bd17a0-f90c-492a-8183-ec384ab007cb]
is owned window = 0
is child window = 0 

Thank you for helping.

Upvotes: 1

Views: 1494

Answers (1)

Michaeldx
Michaeldx

Reputation: 26

There are 3 things you need to check.

  1. Ensure you launch UFT prior to launching the flight application. (Always launch UFT prior to the AUT)
  2. With your test loaded, go to "File>Settings>Properties" and then check the 'Associated add-ins' box. Ensure WPF is present and checked. If not, click the Modify button and select WPF.
  3. Go to "Record>Record And Run Settings...". For each tab present, select the top radio button that says, "Record and run test on any open "

Once you have done the above, try to record again. The code should look like this:

WpfWindow("HP MyFlight Sample Application").WpfEdit("agentName").Set "john"
WpfWindow("HP MyFlight Sample Application").WpfEdit("password").SetSecure "597f38ad85b47efe95f1"
WpfWindow("HP MyFlight Sample Application").WpfButton("OK").Click

Upvotes: 1

Related Questions