录制了登录和信息发布操作,回放时信息发布没插入数据库
web_submit_data("Login.do","Action=http://xxxxxxxxxxxxx/Login.do",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://xxxxxxxxxxxxxxxxxx/",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=useridLogin", "Value=24test24", ENDITEM,
"Name=passwordPasswordID", "Value=24test24", ENDITEM,
"Name=validateCodeID", "Value=aa", ENDITEM,
"Name=method", "Value=LoginUser", ENDITEM,
"Name=submit", "Value=提交", ENDITEM,
LAST);
web_url("EnterpriseDefault.do",
"URL=http://xxxxxxxxxxxxxx/Enterprise/EnterpriseDefault.do",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"Url=../css/manage/images/indicator.gif", ENDITEM,
"Url=../newImage/menubg.gif", ENDITEM,
"Url=../newImage/menu23bg.gif", ENDITEM,
"Url=../newImage/mebe-bg2.gif", ENDITEM,
"Url=../newImage/mebe-bg1.gif", ENDITEM,
"Url=../newImage/mebe-bg3.gif", ENDITEM,
LAST);
lr_think_time(4);
web_url("EnterpriseProductinfo.do",
"URL=http://xxxxxxxxxxxxxxx/Enterprise/EnterpriseProductinfo.do?protype=1",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t6.inf",
"Mode=HTML",
LAST);
web_url("htmleditor.html",
"URL=http://xxxxxxxxxxxxxxx/Enterprise/htmlonline/html/htmleditor.html",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://xxxxxxxxxxx/Enterprise/EnterpriseProductinfo.do?protype=1",
"Snapshot=t7.inf",
"Mode=HTML",
EXTRARES,
"Url=/images/enterprise/t2.jpg", "Referer=http://xxxxxxxxxxxx/Enterprise/EnterpriseProductinfo.do?protype=1", ENDITEM,
LAST);
lr_think_time(25);
web_submit_data("EnterpriseProductinfo.do_2",
"Action=http://xxxxxxxxxxxx/Enterprise/EnterpriseProductinfo.do",
"Method=POST",
"EncType=multipart/form-data",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://xxxxxxxxxxxxx/Enterprise/EnterpriseProductinfo.do?protype=1",
"Snapshot=t8.inf",
"Mode=HTML",
ITEMDATA,
"Name=protype", "Value=1", ENDITEM,
"Name=proname", "Value=oopp布供应信息ppoo", ENDITEM,
"Name=briefProinfo", "Value=oopp布供应信息ppoo", ENDITEM,
"Name=bigclass", "Value=3000", ENDITEM,
"Name=secondclass", "Value=18000", ENDITEM,
"Name=affectday", "Value=10", ENDITEM,
"Name=unit", "Value=1", ENDITEM,
"Name=unitprice", "Value=0", ENDITEM,
"Name=beginamount", "Value=0", ENDITEM,
"Name=amount", "Value=0", ENDITEM,
"Name=model", "Value=", ENDITEM,
LAST);
[ 本帖最后由 laipi 于 2008-7-10 19:11 编辑 ] 脚本回放是否成功?察看是否需要关联 回放成功,但是回放后没有插入数据库
Scan script for correlations
后没见到需要关联的数据
[ 本帖最后由 laipi 于 2008-5-28 17:45 编辑 ] 红色的字体就是录制到的数据提交的操作 "Name=protype", "Value=1", ENDITEM,
"Name=proname", "Value=oopp布供应信息ppoo", ENDITEM,
"Name=briefProinfo", "Value=oopp布供应信息ppoo", ENDITEM,
"Name=bigclass", "Value=3000", ENDITEM,
"Name=secondclass", "Value=18000", ENDITEM,
这几个里面有没有数据唯一性的要求?
回放后看一下结果,找到对应的操作部分,应该有提示,比如告诉你某某ID不能重复。 同意楼上的办法,应该是发布信息时, "Name=proname", "Value=oopp布供应信息ppoo" 这个地方是唯一的,我以前也出过这个错误,参数化就可以了 楼主不妨问一下开发或者查看一下数据库中的相应的表的结构,是否某个字段被设置成了主键. "Name=protype", "Value=1", ENDITEM,
"Name=proname", "Value=oopp布供应信息ppoo", ENDITEM,
"Name=briefProinfo", "Value=oopp布供应信息ppoo", ENDITEM,
"Name=bigclass", "Value=3000", ENDITEM,
"Name=secondclass", "Value=18000", ENDITEM
上面的这些字段被设为“必填项”不可为空这样算是唯一性要求吗?
没有唯一性要求的话还需要参数化吗?
我所填写的这些值我查了数据库表结构 没有设为主键 仅设了个ID为主键
这方面我不太懂 问的问题可能太肤浅 大家不介意
[ 本帖最后由 laipi 于 2008-7-11 16:53 编辑 ]
页:
[1]