|
各位高手好,图片见附件啊,谢谢!
我用LR做一个登陆后,弹出一个主窗体页面见附件,我要对谭金杰进行设置检查点,并LR中RUNTIME并勾中enable image and text checked ,我的脚本如下,
#include "web_api.h"
Action()
{
web_url("LoginCtl.htm",
"URL=http://192.168.15.58:8080/crm_v2/LoginCtl.htm",
"Resource=0",
"RecContentType=text ml",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=images/sys/bg.png", ENDITEM,
"URL=images/sys/bg3_2.png", ENDITEM,
"URL=images/sys/pic.gif", ENDITEM,
"URL=images/sys/bg3_1.png", ENDITEM,
"URL=images/sys/bg3_3.png", ENDITEM,
LAST);
web_custom_request("SystemMaintainDwr.getEmpTypeByUserCode.dwr", "URL=http://192.168.15.58:8080/crm_v2/dwr/call/plaincall/SystemMaintainDwr.getEmpTypeByUserCode.dwr",
"Method=POST",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://192.168.15.58:8080/crm_v2/LoginCtl.htm",
"EncType=text/plain",
"Body=callCount=1\n"
"page=/crm_v2/LoginCtl.htm\n"
"httpSessionId=40390D288CD7CD7BEDED30E83C3A9D0E\n"
"scriptSessionId=99CAAC3EA9599FC4C646ACCE3A0E7C47669\n"
"c0-scriptName=SystemMaintainDwr\n"
"c0-methodName=getEmpTypeByUserCode\n"
"c0-id=0\n"
"c0-param0=string:98101005\n"
"batchId=0\n"
"", LAST);
lr_rendezvous("login");
lr_start_transaction("login");
web_reg_find("Text=谭金杰",LAST); //检查点,
web_submit_data("LoginCtl.htm;jsessionid=40390D288CD7CD7BEDED30E83C3A9D0E",
"Action=http://192.168.15.58:8080/crm_v2/LoginCtl.htm;jsessionid=40390D288CD7CD7BEDED30E83C3A9D0E",
"Method=POST",
"RecContentType=text ml",
"Referer=http://192.168.15.58:8080/crm_v2/LoginCtl.htm",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=actionType", "Value=goLogin", ENDITEM,
"Name=j_username", "Value=98101005", ENDITEM,
"Name=j_password", "Value=111111", ENDITEM,
"Name=j_user_type", "Value=3155", ENDITEM,
EXTRARES,
"URL=images/nav_bg.gif", ENDITEM,
"URL=images/bg.jpg", ENDITEM,
"URL=design/image/new.gif", "Referer=http://192.168.15.58:8080/crm_v2/pinTree.htm", ENDITEM,
"URL=design/image/blank.gif", "Referer=http://192.168.15.58:8080/crm_v2/pinTree.htm", ENDITEM,
"URL=images/opened.gif", "Referer=http://192.168.15.58:8080/crm_v2/pinTree.htm", ENDITEM,
LAST);
lr_end_transaction("login", LR_AUTO);
return 0;
}
脚本执行后报错误为:
Action.c(44): Error -26366: "Text=欢迎" not found for web_reg_find [MsgId: MERR-26366]
Action.c(44): web_submit_data("LoginCtl.htm;jsessionid=40390D288CD7CD7BEDED30E83C3A9D0E") highest severity level was "ERROR", 30271 body bytes, 2018 header bytes [MsgId: MMSG-26388] |
|