LR文字检查点
各位高手好,图片见附件啊,谢谢!我用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
Action.c(44): web_submit_data("LoginCtl.htm;jsessionid=40390D288CD7CD7BEDED30E83C3A9D0E") highest severity level was "ERROR", 30271 body bytes, 2018 header bytes 弱弱问一句
左边界和右边界在哪里
回复 2# 的帖子
我是做检查点,有不是做关联啊,呵呵, web_reg_find("Search=Body", //定义查找范围"SaveCount=ddd", //定义查找计数变量名称
"Text=aaaa", //定义查找内容
LAST);
[ 本帖最后由 mr.bee 于 2008-11-4 13:30 编辑 ] 记错
我想到web_find()了 有可能是中文的原因,我以前找中文老是找不到,把中文换成英文就能找到了。 原帖由 mr.bee 于 2008-11-4 13:32 发表 http://bbs.51testing.com/images/common/back.gif
记错
我想到web_find()了
web_find()也是可以不用定义查找范围的呀
::callphone::: to 楼主,
jsessionid=40390D288CD7CD7BEDED30E83C3A9D0E
需要关联吗? 原帖由 Lemon_s 于 2008-11-4 02:19 PM 发表 http://bbs.51testing.com/images/common/back.gif
web_find()也是可以不用定义查找范围的呀
::callphone:::
好的
明白
谢谢
页:
[1]