增加同步点后执行出错
由于执行到web_link_click("N0000000000100007381");时系统总找不到此对象,提示我需增加等待时间,故我增加了一个同步点obj_wait_bitmap("N0000000000100007381", "Img1", 20);但执行的时候,总会如图的错误。
附脚本如下:
# Shell_TrayWnd
set_window ("Shell_TrayWnd", 3);
toolbar_button_press ("ToolbarWindow32_1", "启动 Internet Explorer 浏览器"); # Button Number 0;
# Browser Main Window
set_window ("Browser Main Window", 5);
list_select_item ("SysTreeView32", "PASS测试地址"); # Item Number 2;
list_select_item ("SysTreeView32", "PASS测试地址;PASS开发测试地址"); # Item Number 5;
# 欢迎使用印章集中作业系统
set_window("欢迎使用印章集中作业系统",4);
edit_set("j_username","luln");
obj_type("j_username","<kTab>");
password_edit_set("j_password","ad5e3fa27fb8ea3d821fcb11fc5e4796");
web_image_click("logon", 29, 14);
# contentIframe20060930112049
set_window("contentIframe20060930112049",1);
web_event("待处理文件(用印)", "click", 60, 9);
set_window("contentIframe20060930112049",2);
obj_wait_bitmap("N0000000000100007381", "Img1", 20);
web_link_click("N0000000000100007381");
web_sync(3);
edit_set("procOpinion","sdfsdfsdfsdf");
web_image_click("button_pass2", 38, 9);
web_sync(1);
web_link_click("返回上一页");
# Shell_TrayWnd
#set_window ("Shell_TrayWnd", 2);
#toolbar_button_press ("ToolbarWindow32_0", "WinRunner - "); # Button Number 2;
我在关注中
我正在考虑俩点地方:1. obj_wait_bitmap("N0000000000100007381", "Img1", 20);中使用N0000000000100007381是否正确?
2. obj_wait_bitmap("N0000000000100007381", "Img1", 20);中的时间再设长些. 有时候我用 obj_mouse_click("button") 时提示 illegal object coordinates, 然后我改成 obj_mouse_click("button",0,0) 就成功了.所以
我想在时间的后面加上:
obj_wait_bitmap("N0000000000100007381", "Img1", 20, 0, 0); obj_wait_bitmap("N0000000000100007381", "Img1", 20, 0, 0);
我试了这个,参数太多.
obj_wait_bitmap("N0000000000100007381", "Img1", 20);中使用N0000000000100007381是否正确?
这个是我用WR自动捕捉生成的.
也试了其它,但也不能成功.
我需要捕获的页面如图. 看一下这个帖子,也许对你有帮助: http://bbs.51testing.com/viewthread.php?tid=5349
页:
[1]