|
为什么在数据表中输入的是
Fly_From Fly_To
Denver Frankfurt
London Los Angeles
捕获到的却是“Denver 6”、“Frankfurt 6”、“London 6”、“Los Angeles 6”?
请高手多多指教,谢谢!
在Text Checkpoint Properties中点选Parameter,再点选Parameter Options按钮,打开Parameter Options对话框。在Name下拉列表中选取Fly_From或Fly_To,指定这个文字检查点使用该字段中的值,当成检查点的预期值。
脚本如下:
SystemUtil.Run "E:\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4b.exe"
Dialog("Login").WinEdit("Agent Name:").Set "abcd"
Dialog("Login").WinEdit("Password:").SetSecure "4ae9020bebf9cf78850576f870d1e28555e82e94"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type "110309"
Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("Fly_From", dtGlobalSheet)
Window("Flight Reservation").WinComboBox("Fly From:").Check CheckPoint("Fly From:")
Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("Fly_To", dtGlobalSheet)
Window("Flight Reservation").WinComboBox("Fly To:").Check CheckPoint("Fly To:")
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "jane"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"
测试结果如下:
Status Times
Passed 2
Failed 2
Text Checkpoint "Fly From:": Failed
Text Checkpoint: captured "Denver 6"
, expected "Denver"
Text Checkpoint "Fly To:": Passed
Text Checkpoint: captured "Frankfurt 6"
Text Checkpoint "Fly From:": Failed
Text Checkpoint: captured "London 6"
, expected "London"
Text Checkpoint "Fly To:": Passed
Text Checkpoint: captured "Los Angeles 6"
|
|