|
我用WR自带的航空订票系统录制了一个脚本,如下:
# Flight Reservation
set_window ("Flight Reservation", 10);
obj_mouse_click ("MSMaskWndClass", 2, 7, LEFT);
obj_type ("MSMaskWndClass","080808");
list_select_item ("Fly From:", "Los Angeles"); # Item Number 3;
list_select_item ("Fly To:", "Sydney"); # Item Number 7;
obj_check_info("FLIGHT","enabled",1,10);
obj_mouse_click ("FLIGHT", 39, 38, LEFT);
# Flights Table
set_window ("Flights Table", 3);
list_select_item ("Flight", "16834 LAX 10:24 AM SYD 01:24 PM SR $162.20"); # Item Number 4;
button_press ("OK");
# Flight Reservation
set_window ("Flight Reservation", 9);
edit_set ("Name:", "t1");
button_set ("Business", ON);
edit_set ("Tickets:", "2");
button_check_info("Insert Order","enabled",1);
button_press ("Insert Order");
obj_wait_bitmap("Insert Done...", "Img1", 10);
set_window ("Flight Reservation", 18);
menu_select_item ("File;New Order");
很简单的一个脚本,执行能通过,暂且管它叫a。我把它复制了一下,叫b。
因为工作需要,我做了一个main脚本调用多个脚本,在调用a和b的时候,只有a能通过,b总是卡在obj_wait_bitmap("Insert Done...", "Img1", 10);这句话上。a、b顺序颠倒也一样。反馈的错误信息是:
Bitmap did not appear within the time limit.
Error: No expected image
Image name: "Img1"
Object name: "Insert Done..."
单独执行都能通过,但在一块调用同步位图总是不行,我想问一下在程序执行的过程中位图或窗口是否会发生什么变化?或者是什么原因导致同步点过不去。
自己反复尝试了很多办法都没办反解决,先谢谢了。 |
|