51Testing软件测试论坛
标题:
web_submit_form转为web_submit_data测试报告不能通过
[打印本页]
作者:
dhh45
时间:
2010-4-15 16:32
标题:
web_submit_form转为web_submit_data测试报告不能通过
#include "as_web.h"
Action()
{
web_url("caseim",
"URL=http://32.1.2.244:9080/caseim/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=images/loginback.jpg", ENDITEM,
"Url=images/14%E4%B8%AA%E5%9C%B0%E5%B8%82%E7%9A%84%E5%9B%BE%E7%89%87/%E7%9C%81%E5%8E%85/login_06.gif", ENDITEM,
"Url=images/f_txt.swf", "Referer=", ENDITEM,
LAST);
lr_think_time( 2 );
web_submit_form("select.jsp",
"Snapshot=t2.inf",
ITEMDATA,
"Name=account", "Value=admin", ENDITEM,
"Name=pwd", "Value=1", ENDITEM,
EXTRARES,
"Url=images/14%E4%B8%AA%E5%9C%B0%E5%B8%82%E7%9A%84%E5%9B%BE%E7%89%87/%E7%9C%81%E5%8E%85/select.jpg", ENDITEM,
"Url=images/loginback2.jpg", ENDITEM,
"Url=images/f_txt.swf", "Referer=", ENDITEM,
"Url=images/index_but_out.gif", ENDITEM,
LAST);
/*以上是录制的脚本,下面是编写的脚本,web_submit_data测试报告显示失败*/
/*
web_url("打开登陆页面",
"URL=http://32.1.2.244:9080/caseim/",
LAST);
lr_think_time( 2 );
web_submit_data("输入登陆信息",
"Action=http://32.1.2.244:9080/caseim/",
"Method=POST",
"TargetFrame=body",
"RecContentType=text/html"
ITEMDATA,
"Name=account", "Value=admin", ENDITEM,
"Name=pwd", "Value=1", ENDITEM,
LAST);
*/
return 0;
}
可能是有些东西没有考虑到,请帮忙,谢谢!
作者:
skyzhu
时间:
2010-4-15 17:04
"RecContentType=text/html" 后面少个逗号
加一个参数 "Mode=HTTP",
再不行就打开
http://32.1.2.244:9080/caseim/
找源文件里的action地址,应该和你现在写的不一样,换掉你现在脚本里的
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2