Highlighted
wencheng Trusted Contributor.
Trusted Contributor.
84 views

Run using data table could not run second round

HI 

    UFT has a keyword view could easy to set a value to import to data table , then I could add other similar value to this Column  as below

KeyWordView02.png

But when I click run on toolbar...the first round could work fine...but when FlightGUI close on last action....the FlightGUI seem not been performed again, so the second round could not run first line of the script and show error:

KeyWordView.png

 

I post my script , please help why My script could not call FlightGUI again......

Thanks!!

=========================Action list script===============

WpfWindow("Micro Focus MyFlight Sample").Move 315,228
WpfWindow("Micro Focus MyFlight Sample").WpfEdit("agentName").Set "john"
WpfWindow("Micro Focus MyFlight Sample").WpfEdit("password").SetSecure "5d9d5201a5a3dead2a04"
WpfWindow("Micro Focus MyFlight Sample").WpfButton("OK").Click
WpfWindow("Micro Focus MyFlight Sample").Move 265,260
WpfWindow("Micro Focus MyFlight Sample").WpfComboBox("fromCity").Select "Los Angeles"
WpfWindow("Micro Focus MyFlight Sample").WpfComboBox("toCity").Select "Portland"
WpfWindow("Micro Focus MyFlight Sample").WpfImage("WpfImage").Click 6,9
WpfWindow("Micro Focus MyFlight Sample").WpfCalendar("日").SetDate "17-Oct-2019"
WpfWindow("Micro Focus MyFlight Sample").WpfComboBox("Class").Select "First"
WpfWindow("Micro Focus MyFlight Sample").WpfButton("FIND FLIGHTS").Click
WpfWindow("Micro Focus MyFlight Sample").WpfTable("flightsDataGrid").SelectCell 1,1
WpfWindow("Micro Focus MyFlight Sample").WpfButton("SELECT FLIGHT").Click
WpfWindow("Micro Focus MyFlight Sample").Move 535,113
WpfWindow("Micro Focus MyFlight Sample").WpfEdit("passengerName").Set DataTable("PassengerName", dtGlobalSheet)
WpfWindow("Micro Focus MyFlight Sample").WpfButton("ORDER").Click
WpfWindow("Micro Focus MyFlight Sample").Close

=====================================================

wyld

Labels (2)
0 Likes
4 Replies
wencheng Trusted Contributor.
Trusted Contributor.

Re: Run using data table could not run second round

Hi All

    I discuss with my Colleague about this condition...the root cause that UFT could not call FlightFUI Application... 

    But If I "Manual run" FlihtGUI when UFT perform scrond round testing...the script could continue testing the third even fourth / fifth could call FlightGUI well....not like second round~~~~

 

wyldkao

0 Likes
Knowledge Partner
Knowledge Partner

Re: Run using data table could not run second round

How are you opening the flight app programmatically or via the UFT settings?

Mark Smith.

0 Likes
wencheng Trusted Contributor.
Trusted Contributor.

Re: Run using data table could not run second round

HI 

   Thanks yor reply.

I use default setting as below

RecordAnd RunSetting.png

 

I has tested 2 version (14.53 and 14.50)~~~got the same result.

 

wyldao

0 Likes
Knowledge Partner
Knowledge Partner

Re: Run using data table could not run second round

I prefer to control the application programmatically, put this as the 1st line in you script

SystemUtil.Run "C:\Program Files (x86)\HP\Unified Functional Testing\samples\Flights Application\FlightsGUI.exe"

Then close the widow/logoff at the end of the script. That way each iteration will start with the app in a known state. You may have to record logging on after this command.

Mark Smith.

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.