回放时遇到错误
我回放脚本时遇到这个错误:Action.c(1278): Error -26377: No match found for the requested parameter "OrderId". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size
Action.c(1278): Error -26374: The above "not found" error(s) may be explained by header and body byte counts being 0 and 0, respectively.
Action.c(1278): web_concurrent_end highest severity level was "ERROR"
请问怎么解决,谢谢大家 你在代码中做了关联?关联捕获参数失败而已 原帖由 云层 于 2008-8-29 11:58 发表 http://bbs.51testing.com/images/common/back.gif
你在代码中做了关联?关联捕获参数失败而已
我做关联了,而且还将这个函数放在页面之前。页面代码明明有这个变量,为什么捕捉不到呢,用基于url录制的 把服务器返回和你的关联函数贴出来,应该是你的关联边界设置的不好导致没有抓到合适的关联参数 原帖由 云层 于 2008-8-29 14:55 发表 http://bbs.51testing.com/images/common/back.gif
把服务器返回和你的关联函数贴出来,应该是你的关联边界设置的不好导致没有抓到合适的关联参数
web_reg_save_param("OrderId", "LB=<span id=\"salenumber\">", "RB=</span>","NotFound=ERROR",LAST);
web_submit_data("sale.do_2",
"Action=https://democoe.verican.us/cod6/sale.do?catalog=demo",
"Method=POST",
"RecContentType=text/html",
"Referer=https://democoe.verican.us/cod6/sale.do?catalog=demo",
"Snapshot=t11.inf",
"Mode=HTTP",
ITEMDATA,
"Name=paymentType", "Value=Visa", ENDITEM,
"Name=creditCardNumber", "Value=1111111111111111", ENDITEM,
"Name=expiredmonth", "Value=03", ENDITEM,
"Name=expiredYear", "Value=2020", ENDITEM,
"Name=company", "Value=", ENDITEM,
"Name=titleInDepartment", "Value=", ENDITEM,
"Name=street", "Value=aaa", ENDITEM,
"Name=city", "Value=beijing", ENDITEM,
LAST);
web_add_cookie("__utmb=178850353.16.10.1219906892; DOMAIN=democoe.verican.us");
web_concurrent_start(NULL);
web_url("cod.js_7",
"URL=https://democoe.verican.us/cod6/statics/common/js/cod.js?ver=c15",
"Resource=1",
"RecContentType=text/javascript",
"Referer=https://democoe.verican.us/cod6/sale.do?catalog=demo&view=true&sale=100908064",
LAST);
web_url("common.css_7",
"URL=https://democoe.verican.us/cod6/statics/common/css/common.css?ver=c115",
"Resource=1",
"RecContentType=text/css",
"Referer=https://democoe.verican.us/cod6/sale.do?catalog=demo&view=true&sale=100908064",
LAST);
web_url("default.css_7",
"URL=https://democoe.verican.us/cod6/statics/common/css/default.css?ver=c168",
"Resource=1",
"RecContentType=text/css",
"Referer=https://democoe.verican.us/cod6/sale.do?catalog=demo&view=true&sale=100908064",
LAST);
web_url("prototype.js_7",
"URL=https://democoe.verican.us/cod6/statics/common/js/prototype.js?ver=c11",
"Resource=1",
"RecContentType=text/javascript",
"Referer=https://democoe.verican.us/cod6/sale.do?catalog=demo&view=true&sale=100908064",
LAST);
web_url("scriptaculous.js_7",
"URL=https://democoe.verican.us/cod6/statics/common/lightbox/js/scriptaculous.js?load=effects&ver=c11",
"Resource=1",
"RecContentType=text/javascript",
"Referer=https://democoe.verican.us/cod6/sale.do?catalog=demo&view=true&sale=100908064",
LAST);
web_url("lightbox.css_7",
"URL=https://democoe.verican.us/cod6/statics/common/lightbox/css/lightbox.css?ver=c11",
"Resource=1",
"RecContentType=text/css",
"Referer=https://democoe.verican.us/cod6/sale.do?catalog=demo&view=true&sale=100908064",
LAST);
web_url("lightbox.js_7",
"URL=https://democoe.verican.us/cod6/statics/common/lightbox/js/lightbox.js?ver=c11",
"Resource=1",
"RecContentType=text/javascript",
"Referer=https://democoe.verican.us/cod6/sale.do?catalog=demo&view=true&sale=100908064",
LAST);
web_url("jquery.js_7",
"URL=https://democoe.verican.us/cod6/statics/common/js/jquery.js?ver=c11",
"Resource=1",
"RecContentType=text/javascript",
"Referer=https://democoe.verican.us/cod6/sale.do?catalog=demo&view=true&sale=100908064",
LAST);
web_url("logo.gif_6",
"URL=https://democoe.verican.us/fms/images/catalogs/demo/logo.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=https://democoe.verican.us/cod6/sale.do?catalog=demo&view=true&sale=100908064",
LAST);
web_concurrent_end(NULL);
在那个页面上,view source 有:<th><h3>Order #<span id="salenumber">1404</span></h3></th>
我想取到1404这个值作为参数OrderId。还需要贴其他代码吗?
回复 5# 的帖子
该参数OrderId用在什么地方啊,我在代码中怎么没有找到啊,代码没有帖完整吧,还有你的关联函数放的位置是否正确,自己可以检查一下啊 原帖由 tinafrog 于 2008-8-29 15:48 发表 http://bbs.51testing.com/images/common/back.gif该参数OrderId用在什么地方啊,我在代码中怎么没有找到啊,代码没有帖完整吧,还有你的关联函数放的位置是否正确,自己可以检查一下啊
在非常靠后的地方用,在什么地方用跟这个错误关系不大吧,是这个参数它直接在页面中就找不到。
关联函数的位置正确,因为在submit之后出现的页面中找参数,所以将这个函数放在submit方法之前。
回复 7# 的帖子
你需要把你关联的地方的代码贴出来,看一下你关联设置的对不对 原帖由 tinafrog 于 2008-8-29 15:56 发表 http://bbs.51testing.com/images/common/back.gif你需要把你关联的地方的代码贴出来,看一下你关联设置的对不对
后面这段代码没有执行到,直接在web_reg_save_param这里就因为找不到而退出了。后面在这里用到:(这里还没执行到呢)
web_url("{OrderId}",
"URL=https://democoe.verican.us/admin/sale.do?edit=true&sale=100908064&catalog=demo",
"Resource=0",
"RecContentType=text/html",
"Referer=https://democoe.verican.us/admin/sale.do?plist=true&catalog=demo",
"Snapshot=t15.inf",
"Mode=HTTP",
LAST); 原帖由 yiyireal 于 2008-8-29 16:14 发表 http://bbs.51testing.com/images/common/back.gif
后面这段代码没有执行到,直接在web_reg_save_param这里就因为找不到而退出了。后面在这里用到:(这里还没执行到呢)
web_url("{OrderId}",
"URL=https://democoe.verican.us/admin/sale.do?edit=true&sale=1 ...
web_url("{OrderId}"这里我看不懂啊,你上面所说1404是服务器动态返回的数据吗?建议还是不要自动关联,录制两个相同脚本进行比较,就可以看出来了,并能找到你所要关联的数据. 原帖由 tinafrog 于 2008-8-29 16:22 发表 http://bbs.51testing.com/images/common/back.gif
web_url("{OrderId}"这里我看不懂啊,你上面所说1404是服务器动态返回的数据吗?建议还是不要自动关联,录制两个相同脚本进行比较,就可以看出来了,并能找到你所要关联的数据.
1404是
服务器动态返回的。我没自动关联,我手动关联的。这个号是唯一的,每次访问页面都会不同,这回是1404,下回就是1405了,所以必须要关联。 原帖由 tinafrog 于 2008-8-29 16:22 发表 http://bbs.51testing.com/images/common/back.gif
web_url("{OrderId}"这里我看不懂啊,你上面所说1404是服务器动态返回的数据吗?建议还是不要自动关联,录制两个相同脚本进行比较,就可以看出来了,并能找到你所要关联的数据.
1404是服务器动态数据。我不是自动关联的,我是手动关联的。下次访问就是1405了,所以这个值必须要关联的。 不能回复了? "{OrderId}"这个写法就不说了,直接是错误的,自己看看测试报告结果里面是不是title是{orderid}
你要把服务器返回的页面代码发出来,否则谁知道你的边界设置的正确否,还有就是录制脚本用Html_base script,否则一个屏幕的资源看的头晕
sale=这个id你确定没问题?也许这个id也要关联呢? 加一句试试
web_set_max_html_param_len(10000); 学习中
页:
[1]