51Testing软件测试论坛
标题:
一个测试时间输入的Script
[打印本页]
作者:
小李美刀
时间:
2006-8-31 10:41
标题:
一个测试时间输入的Script
我定义了一数组,用于输入时间,当输入的时间在今天之前时会在report里记录"Your entered "&p
" is invalid date".是WR测试的简单的应用例子.希望对广大新战友有所帮助.
但有一问题我始终不明白怎么回事,该脚本是全部用手写的,没次执行的时候都提示"can't find the object MSMaskMndClass",在GUI MAP FILE里该object 也是存在的,只有从新record 该object后程序才通过,不只为什么?
public p[]={"091006","010101","100106","020202","110106"};
for(i=0;i<5;i++)
{
set_window("Flight Reservation");
obj_type ("MSMaskWndClass",p
);
list_select_item("Fly From:","#"&i);
if(win_exists("Flight Reservations")==E_OK)
{
set_window("Flight Reservations")
button_press("确定");
report_msg("Your entered "&p
" is invalid date");
}
else
set_window("Flight Reservation");
set_window("Flight Reservation");
list_select_item("Fly To:","Sydney");
obj_mouse_click("FLIGHT",0,0);
wait(2);
if(win_exists("Flight Reservations")==E_OK)
{
set_window("Flight Reservations")
button_press("确定");
}
else
{
set_window("Flights Table");
list_select_item("Flight","#"&i);
button_press("OK");
set_window("Flight Reservation");
obj_type("Name:","lihai"&i);
button_press("Insert Order");
report_msg("You have booked the ticket with date of "&p
);
}
set_window("Flight Reservation");
obj_mouse_click("Button",0,0);
}
[
本帖最后由 小李美刀 于 2006-8-31 14:28 编辑
]
作者:
小李美刀
时间:
2006-8-31 10:48
哎呀,怎么才能不让字体是斜的呀,搞不好!
还有为什么我写的 p[] 只显示 p 呢
[
本帖最后由 小李美刀 于 2006-8-31 10:50 编辑
]
作者:
生如火花
时间:
2006-8-31 14:12
字体在设置里改,GUI的问题参照一下我在精华区里关于GUI的贴
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2