|
求救啊:
我在自己写脚本测试QTP自带的订票系统时,写到谈出 Flights Table 这个对话筐的时候,碰到一个问题,代码如下:
SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\","open"
dialog("regexpwndtitle:=login").winedit("attached text:=Agent Name:").set "1111"
dialog("regexpwndtitle:=login").winedit("attached text:=password:").set "mercury"
dialog("regexpwndtitle:=login").winbutton("regexpwndtitle:=OK").click
window("regexpwndtitle:=Flight Reservation").activeX("acx_name:=MaskEdBox").type "111111"
window("regexpwndtitle:=Flight Reservation").wincombobox("attached text:=fly from:").select "denver"
window("regexpwndtitle:=Flight Reservation").wincombobox("attached text:=fly to:").select "london"
window("regexpwndtitle:=Flight Reservation").winbutton("regexpwndtitle:=flight").click
window("text:=Flight Reservation").dialog("text:=flights table").winlist( "selection:=20255 DEN 10:12 AM LON 05:23 PM AA $112.20").select "20260 DEN 08:12 AM LON 03:23 PM AA $112.20"
每次执行到最后一句的时候,就报错winlist这个对象不能识别,winlist基本所有的属性我都试过了,好像都不行啊。。 window 和dialog的属性我也改过,好像也不行,求各位行家帮忙改改代码! 急等! |
|