|
我用LR11录制LR自带的网站,动作是登录+退出。
录制完成后,回放脚步,使用Scan action for correlation自动扫描需要关联的地方,但是没有结果为空。
所以接着我又录制了一份脚本,重复刚才的流程。对比两次脚本的不同地方,使用web_reg_save_param做手动关联。
运行脚本后为什么还是提示错误,是我关联错误吗?请各位帮忙看看!
- Action.c(31): Error -27987: Requested image not found [MsgId: MERR-27987]
- Action.c(31): web_image("SignOff Button") highest severity level was "ERROR", 0 body bytes, 0 header bytes [MsgId: MMSG-26388]
复制代码
- Action()
- {
- web_reg_save_param("test111",
- "LB=Name=userSession value=", "RB=>", LAST );
- //第二次使用 "LB=Name=userSession\"value=\"", "RB=>", LAST );
- web_url("WebTours",
- "URL=http://127.0.0.1:1080/WebTours/",
- "Resource=0",
- "RecContentType=text/html",
- "Referer=",
- "Snapshot=t1.inf",
- "Mode=HTML",
- LAST);
- lr_think_time(5);
- web_submit_data("login.pl",
- "Action=http://127.0.0.1:1080/WebTours/login.pl",
- "Method=POST",
- "RecContentType=text/html",
- "Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
- "Snapshot=t2.inf",
- "Mode=HTML",
- ITEMDATA,
- "Name=userSession", "Value={test111}", ENDITEM,
- "Name=username", "Value=test", ENDITEM,
- "Name=password", "Value=test", ENDITEM,
- "Name=JSFormSubmit", "Value=on", ENDITEM,
- "Name=login.x", "Value=48", ENDITEM,
- "Name=login.y", "Value=0", ENDITEM,
- LAST);
- web_image("SignOff Button",
- "Alt=SignOff Button",
- "Snapshot=t3.inf",
- LAST);
- return 0;
- }
复制代码
|
|