怎样让脚本保留中文:搜索的时候输入关键字是中文
我再对搜索功能进行压力测试的时候,关键字用了中文,但是在脚本中找不到,没有办法进行参数化,请问要怎样设置才可以保持中文的形式?谢谢 怎么会找不到呢?把代码贴出来看看
可以考虑使用lr_convert_string_encoding函数转换字符串编码格式 编码问题吧 不如贴下脚本看看,便于分析。 web_submit_data("hotSearchInfo.action",
"Action=http://www.drm.stu.edu.cn/webstore/hotSearchInfo.action",
"Method=POST",
"RecContentType=application/json",
"Referer=http://www.drm.stu.edu.cn/webstore/",
"Snapshot=t78.inf",
"Mode=HTTP",
ITEMDATA,
"Name=topNumber", "Value=7", ENDITEM,
LAST);
web_concurrent_start(NULL);
web_url("announce.png",
"URL=http://www.drm.stu.edu.cn/webstore/include/index/images/announce.png",
"Resource=1",
"RecContentType=image/png",
"Referer=http://www.drm.stu.edu.cn/webstore/",
"Snapshot=t79.inf",
LAST);
web_url("login.gif",
"URL=http://www.drm.stu.edu.cn/webstore/include/index/images/login.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://www.drm.stu.edu.cn/webstore/",
"Snapshot=t80.inf",
LAST);
lr_think_time(5);
web_url("searchRequest.action",
"URL=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.drm.stu.edu.cn/webstore/",
"Snapshot=t84.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("findGoods.css",
"URL=http://www.drm.stu.edu.cn/webstore/include/search/css/findGoods.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t85.inf",
LAST);
web_url("head.css",
"URL=http://www.drm.stu.edu.cn/webstore/include/index/css/head.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t86.inf",
LAST);
web_url("jquery.pagination.js",
"URL=http://www.drm.stu.edu.cn/webstore/include/jpage/jquery.pagination.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t87.inf",
LAST);
web_url("pagination.css",
"URL=http://www.drm.stu.edu.cn/webstore/include/jpage/pagination.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t88.inf",
LAST);
web_url("goodsLeft.css",
"URL=http://www.drm.stu.edu.cn/webstore/include/index/css/goodsLeft.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t89.inf",
LAST);
web_url("shu4.jpg",
"URL=http://www.drm.stu.edu.cn/webstore/upload/AdImg/shu4.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t90.inf",
LAST);
web_url("shu2.jpg",
"URL=http://www.drm.stu.edu.cn/webstore/upload/AdImg/shu2.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t92.inf",
LAST);
web_url("leftSearch.jpg",
"URL=http://www.drm.stu.edu.cn/webstore/include/index/images/leftSearch.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t93.inf",
LAST);
web_url("shopping.jpg",
"URL=http://www.drm.stu.edu.cn/webstore/include/index/images/shopping.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t94.inf",
LAST);
web_url("question.jpg",
"URL=http://www.drm.stu.edu.cn/webstore/include/index/images/question.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t95.inf",
LAST);
web_concurrent_end(NULL);
web_url("street-title.gif",
"URL=http://www.drm.stu.edu.cn/webstore/include/index/images/street-title.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t91.inf",
LAST);
web_url("444.jpg",
"URL=http://www.drm.stu.edu.cn/webstore/include/search/images/444.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t96.inf",
LAST);
web_submit_data("hotSearchInfo.action_2",
"Action=http://www.drm.stu.edu.cn/webstore/hotSearchInfo.action",
"Method=POST",
"RecContentType=application/json",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t97.inf",
"Mode=HTTP",
ITEMDATA,
"Name=topNumber", "Value=7", ENDITEM,
LAST);
web_custom_request("getUserName.action_2",
"URL=http://www.drm.stu.edu.cn/webstore/getUserName.action",
"Method=POST",
"Resource=1",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t98.inf",
"EncType=",
LAST);
web_url("findStore.css",
"URL=http://www.drm.stu.edu.cn/webstore/include/search/css/findStore.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=2&q=%E6%88%91%E7%9A%84%E5%B0%8F%E5%BA%97&submit.x=19&submit.y=11",
"Snapshot=t103.inf",
LAST);
web_url("storeLeft.css",
"URL=http://www.drm.stu.edu.cn/webstore/include/index/css/storeLeft.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=2&q=%E6%88%91%E7%9A%84%E5%B0%8F%E5%BA%97&submit.x=19&submit.y=11",
"Snapshot=t104.inf",
LAST);
web_url("shu1.jpg",
"URL=http://www.drm.stu.edu.cn/webstore/upload/AdImg/shu1.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=2&q=%E6%88%91%E7%9A%84%E5%B0%8F%E5%BA%97&submit.x=19&submit.y=11",
"Snapshot=t105.inf",
LAST);
web_concurrent_end(NULL);
web_custom_request("getUserName.action_3",
"URL=http://www.drm.stu.edu.cn/webstore/getUserName.action",
"Method=POST",
"Resource=1",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=2&q=%E6%88%91%E7%9A%84%E5%B0%8F%E5%BA%97&submit.x=19&submit.y=11",
"Snapshot=t106.inf",
"EncType=",
LAST);
web_url("1271596801906.jpg",
"URL=http://www.drm.stu.edu.cn/webstore/upload/store/1271596801906.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=2&q=%E6%88%91%E7%9A%84%E5%B0%8F%E5%BA%97&submit.x=19&submit.y=11",
"Snapshot=t107.inf",
LAST);
web_submit_data("hotSearchInfo.action_3",
"Action=http://www.drm.stu.edu.cn/webstore/hotSearchInfo.action",
"Method=POST",
"RecContentType=application/json",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=2&q=%E6%88%91%E7%9A%84%E5%B0%8F%E5%BA%97&submit.x=19&submit.y=11",
"Snapshot=t108.inf",
"Mode=HTTP",
ITEMDATA,
"Name=topNumber", "Value=7", ENDITEM,
LAST);
[ 本帖最后由 efficient 于 2010-5-25 21:57 编辑 ] web_submit_data("hotSearchInfo.action_2",
"Action=http://www.drm.stu.edu.cn/webstore/hotSearchInfo.action",
"Method=POST",
"RecContentType=application/json",
"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
"Snapshot=t97.inf",
"Mode=HTTP",
ITEMDATA,
"Name=topNumber", "Value=7", ENDITEM,
LAST);
中的"Referer=http://www.drm.stu.edu.cn/webstore/searchRequest.action?searchType=1&q=%E6%95%99%E7%88%B6&submit.x=29&submit.y=17",
这里的q=%E6%95%99%E7%88%B6 应该是我要搜索的内容,我搜索的是中文,但是被翻译成了这种码。如果我要参数化搜索内容 ,改怎么设置?
页:
[1]