QTP自动例子的源码分析--ClearMainWindow

概述:

本系列文章主要用来研究和分析QTP自动的例子的源码分析,学习它的编码方式和代码结构,

 

所涉及的Action 分三部分

1.共用的Action

2.功能性Action,它们一般会调用共用的Action

3.功能性函数

 

 Action:FlightLib1

下面是ClearMainWindow的具体分析(作用和好处,以免在运行的时候,之前的那个窗口是开着的,导致回访的时候出错,这样代码的健壮性比较好)

 

Purpose:This Action clears the main window and Does not save any information in the window

Input Params:None

Output Params:None

代码8~9行,如果Open Order界面已经是开着的,点击cancel将其关闭

代码12~16行,通过点击new order,清除之前可能有输入的记录

代码18~22行,Checking to see if message window appears.  If so, function presses "No" button and doesn't save the changes(如图里的错误信息)

QTP自动例子的源码分析--ClearMainWindow

 

 

QTP自动例子的源码分析--ClearMainWindow


本文转自 jasonteststudy 51CTO博客,原文链接:http://blog.51cto.com/jasonteststudy/1330644