Source Code Analysis of QTP automatic example-- OpenOrder
Overview:
This series of articles is mainly used to study and analyze the source code analysis of QTP automatic examples, and to learn its coding mode and code structure.
The Action involved is divided into three parts
1. Shared Action
two。 Functional Action, which generally calls the shared Action
3. Functional function
Action:FlightLib1
The following is a specific analysis of OpenOrder
Purpose:This Action takes in as it's input parameter an order number.it opens a flight reservation
According to this number, open flight reservation via order number
Input Params:Parameter ("OrderNumber")
Output Params:None
Line 11: 16, when Flight Reservation is active state, get order no. Order no through the GetROProperty method. If empty, give 0
Code 19: 21, which converts the obtained value to an integer (I don't quite understand, why is it written here)?
Line 24, open open order
Line 28: 31, if the "Open Order" interface is already open (exist (1) script looks for one minute Open Order for 1 minute), check On.
Line 34: 35, enter the previously obtained value into Open Order num. In field
Code 344th 45 lines, if through Order No. The record of the query is not available and will be returned to the main interface.