51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2616|回复: 2
打印 上一主题 下一主题

[原创] 在录制的脚本中找不到想要的参数

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-8-13 09:44: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;
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2010-8-13 09:54:34 | 只看该作者
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);

应该是这里
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2010-8-13 11:06:29 | 只看该作者
顶楼上的
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-17 18:21 , Processed in 0.079507 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表