51Testing软件测试论坛

标题: 在录制的脚本中找不到想要的参数 [打印本页]

作者: megan0228    时间: 2010-8-13 09:44
标题: 在录制的脚本中找不到想要的参数
这是我录制的一个登录bugfree界面的脚本,我想将‘用户名’和‘密码’参数化,但在下面的脚本中好像找不到这两个参数,请各位支招!!!!!

vuser_init()
{
web_submit_data("check_outchain.php",
  "Action=http://qurl.f.360.cn/check_outchain.php",
  "Method=POST",
  "EncType=multipart/form-data",
  "RecContentType=text/xml",
  "Referer=",
  "Snapshot=t1.inf",
  "Mode=HTML",
  ITEMDATA,
  "Name=urls", "Value=f9053738de83f08ddf78ab01290ce255|2dda16efea31ea25df7c5fd57dfd242b|2dda16efea31ea25df7c5fd57dfd242b\tnUE0pQbiYmR5Zv4kAwthZF4kZQZ6BQN4ZP9vqJqzpzIy\n", ENDITEM,
  "Name=src", "Value=addrbar", ENDITEM,
  "Name=product", "Value=wd", ENDITEM,
  "Name=combo", "Value=urlproc", ENDITEM,
  "Name=v", "Value=1", ENDITEM,
  "Name=vk", "Value=471cfae9", ENDITEM,
  "Name=mid", "Value=b7d4ac08dcb68ebdfefe8244d6a2aed7", ENDITEM,
  LAST);
web_add_cookie("TestCurrentProjectID=2; DOMAIN=192.168.1.103");
web_add_cookie("RecPerPageNum=20; DOMAIN=192.168.1.103");
web_add_auto_header("Accept-Encoding",
  "gzip, deflate");
web_add_header("Accept-Language",
  "zh-cn");
web_url("bugfree",
  "URL=http://192.168.1.103:8080/bugfree",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t2.inf",
  "Mode=HTML",
  LAST);
web_url("360safeurl",
  "URL=http://stat.360safe.com/360safeurl/?type=upnet&mid=b7d4ac08dcb68ebdfefe8244d6a2aed7&qn=122&es=15&ea=0&eo=0&rh0=90&rh1=2&rh2=7&rh3=7",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Mode=HTML",
  LAST);
web_revert_auto_header("Accept-Encoding");
web_submit_data("check_outchain.php_2",
  "Action=http://qurl.f.360.cn/check_outchain.php",
  "Method=POST",
  "EncType=multipart/form-data",
  "RecContentType=text/xml",
  "Referer=",
  "Snapshot=t3.inf",
  "Mode=HTML",
  ITEMDATA,
  "Name=urls", "Value=0846afc4c6612c9afab54b564c4bdcfd|2dda16efea31ea25df7c5fd57dfd242b|2dda16efea31ea25df7c5fd57dfd242b\tnUE0pQbiYmR5Zv4kAwthZF4kZQZ6BQN4ZP9vqJqzpzIyYj==\n", ENDITEM,
  "Name=src", "Value=addrbar", ENDITEM,
  "Name=product", "Value=wd", ENDITEM,
  "Name=combo", "Value=urlproc", ENDITEM,
  "Name=v", "Value=1", ENDITEM,
  "Name=vk", "Value=1d5fe72d", ENDITEM,
  "Name=mid", "Value=b7d4ac08dcb68ebdfefe8244d6a2aed7", ENDITEM,
  LAST);
web_add_auto_header("Accept-Encoding",
  "gzip, deflate");
web_add_auto_header("Accept-Language",
  "zh-cn");
web_url("Login.php",
  "URL=http://192.168.1.103:8080/bugfree/Login.php",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t4.inf",
  "Mode=HTML",
  EXTRARES,
  "Url=Image/login_bg_center.gif", ENDITEM,
  "Url=Image/login_button.png", ENDITEM,
  "Url=Image/login_separate_line.gif", ENDITEM,
  "Url=Image/login_input.gif", ENDITEM,
  LAST);
lr_think_time(8);
web_custom_request("Login.php_2",
  "URL=http://192.168.1.103:8080/bugfree/Login.php",
  "Method=POST",
  "Resource=0",
  "RecContentType=text/xml",
  "Referer=http://192.168.1.103:8080/bugfree/Login.php",
  "Snapshot=t5.inf",
  "Mode=HTML",
  "Body=xajax=xCheckUserLogin&xajaxr=1281663167406&xajaxargs[]=%3Cxjxquery%3E%3Cq%3ETestUserName%3Dzenglian%26TestUserPWD%3D123456%26Language%3DZH_CN_UTF-8%26HttpRefer%3D%3C%2Fq%3E%3C%2Fxjxquery%3E",
  LAST);
web_url("bugfree_2",
  "URL=http://192.168.1.103:8080/bugfree/",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t6.inf",
  "Mode=HTML",
  EXTRARES,
  "Url=Css/Basic.css", ENDITEM,
  "Url=Css/calendar.css", ENDITEM,
  LAST);
web_revert_auto_header("Accept-Encoding");
web_revert_auto_header("Accept-Language");
web_submit_data("check_outchain.php_3",
  "Action=http://qurl.f.360.cn/check_outchain.php",
  "Method=POST",
  "EncType=multipart/form-data",
  "RecContentType=text/xml",
  "Referer=",
  "Snapshot=t7.inf",
  "Mode=HTML",
  ITEMDATA,
  "Name=urls", "Value=0846afc4c6612c9afab54b564c4bdcfd|2dda16efea31ea25df7c5fd57dfd242b|2dda16efea31ea25df7c5fd57dfd242b\tnUE0pQbiYmR5Zv4kAwthZF4kZQZ6BQN4ZP9vqJqzpzIyYj==\n", ENDITEM,
  "Name=src", "Value=addrbar", ENDITEM,
  "Name=product", "Value=wd", ENDITEM,
  "Name=combo", "Value=urlproc", ENDITEM,
  "Name=v", "Value=1", ENDITEM,
  "Name=vk", "Value=1d5fe72d", ENDITEM,
  "Name=mid", "Value=b7d4ac08dcb68ebdfefe8244d6a2aed7", ENDITEM,
  EXTRARES,
  "Url=http://192.168.1.103:8080/bugfree/Image/TreeMenu/opened.gif", "Referer=http://192.168.1.103:8080/bugfree/ModuleList.php", ENDITEM,
  "Url=http://192.168.1.103:8080/bugfree/Image/TreeMenu/blank.gif", "Referer=http://192.168.1.103:8080/bugfree/ModuleList.php", ENDITEM,
  "Url=http://192.168.1.103:8080/bugfree/Image/icon_refresh.gif", "Referer=http://192.168.1.103:8080/bugfree/UserControl.php?TestMode=Bug", ENDITEM,
  "Url=http://192.168.1.103:8080/bugfree/Image/Loading.gif", "Referer=http://192.168.1.103:8080/bugfree/UserControl.php?TestMode=Bug", ENDITEM,
  LAST);
return 0;
}
作者: xueying1123    时间: 2010-8-13 09:54
web_custom_request("Login.php_2",
  "URL=http://192.168.1.103:8080/bugfree/Login.php",
  "Method=POST",
  "Resource=0",
  "RecContentType=text/xml",
  "Referer=http://192.168.1.103:8080/bugfree/Login.php",
  "Snapshot=t5.inf",
  "Mode=HTML",
  "Body=xajax=xCheckUserLogin&xajaxr=1281663167406&xajaxargs[]=%3Cxjxquery%3E%3Cq%3ETestUserName%3Dzenglian%26TestUserPWD%3D123456%26Language%3DZH_CN_UTF-8%26HttpRefer%3D%3C%2Fq%3E%3C%2Fxjxquery%3E",
  LAST);

应该是这里
作者: fiskeryang    时间: 2010-8-13 11:06
顶楼上的




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2