51Testing软件测试论坛

标题: qtp脚本问题 [打印本页]

作者: zhang0077    时间: 2010-1-4 21:55
标题: qtp脚本问题
Window("Flight Reservation").Activate
Window("Flight Reservation").WinObject("Date of Flight:").Click
Window("Flight Reservation").WinObject("Date of Flight:").Type "1"
Window("Flight Reservation").WinObject("Date of Flight:").Type "0"
Window("Flight Reservation").WinObject("Date of Flight:").Type "5"
Window("Flight Reservation").WinObject("Date of Flight:").Type "1"
Window("Flight Reservation").WinObject("Date of Flight:").Type "0"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Denver"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Frankfurt"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").Activate
Window("Flight Reservation").WinEdit("Name:").Type "to"
Window("Flight Reservation").WinEdit("Name:").Type "m"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").Activate


高手给看一下,我这段代码的 type中为什么是分开的,怎么不在一个type里面,例如 我输入的tom 分别在两个type中,是什么原因????
作者: superliming    时间: 2010-1-5 08:47
估计是你输入的时候写to后点了下鼠标,在写的m,没关系可以把这两个合成一句。
作者: zhang0077    时间: 2010-1-5 17:42
标题: 回复 2# 的帖子
我每次录制的时候都是出现这种情况,
输入订票日期时也存在这种情况
我在record and run settings 里面选择了 record and run test on any open windows-based application
从订票页面开始录制时就会出现这种情况
但是当我选择了 record and run only on 时
从登陆页面开始录制时就不存在这种情况了




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2