loadrunner录制的ajax生成的表单回放失败
本帖最后由 wism 于 2011-6-21 15:52 编辑//添加登机人
web_submit_data("PlanePassager.ashx_2",
"Action=http://192.168.1.222/Ajax/PlanePassager.ashx",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://192.168.1.222/PlaneOrder.aspx",
"Snapshot=t15.inf",
"Mode=HTML",
ITEMDATA,
"Name=type", "Value=5", ENDITEM,
"Name=cname", "Value=测试", ENDITEM,
"Name=code", "Value=g11111111", ENDITEM,
"Name=ctype", "Value=0", ENDITEM,
"Name=insurance", "Value=0", ENDITEM,
"Name=sex", "Value=0", ENDITEM,
"Name=birthday", "Value=1980-05-16", ENDITEM,
"Name=cttype", "Value=1", ENDITEM,
LAST);
web_submit_data("PlanePassager.ashx_3",
"Action=http://192.168.1.222/Ajax/PlanePassager.ashx",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://192.168.1.222/PlaneOrder.aspx",
"Snapshot=t16.inf",
"Mode=HTML",
ITEMDATA,
"Name=type", "Value=4", ENDITEM,
LAST);
web_submit_data("PlanePassager.ashx_4",
"Action=http://192.168.1.222/Ajax/PlanePassager.ashx",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://192.168.1.222/PlaneOrder.aspx",
"Snapshot=t17.inf",
"Mode=HTML",
ITEMDATA,
"Name=type", "Value=9", ENDITEM,
LAST);
在第一个web_submit_data中,添加了登机人信息,提交,ajax在本页生成并画了一个表单显示.录制到的结果就是第二个和第三个web_submit_data,里边没有数据,不知道如何处理?只有在Tree模式中能看到PlanePassager.ashx_3和PlanePassager.ashx_4中要提交的内容.
开发给的代码:
function ShowPassgerList() {
$.post("Ajax/PlanePassager.ashx", {
type: "4"
},
function (data) {
if (data.length > 1) {
document.getElementById("PassagerList").innerHTML = data;
GetTotalPrice();
}
});
}
function GetTotalPrice() {
$.post("Ajax/PlanePassager.ashx", {
type: "9"
},
function (data) {
if (data.length > 1) {
var dprice = data.split(",");
document.getElementById("tprice").innerHTML = "<em>" + dprice + "</em>";
document.getElementById("Span1").innerHTML = dprice; 沉了~~~ ajax没啥数据你就别模拟了没事啊,你只要考虑最终做的数据包是啥就行了 我也遇到相似的问题,这该怎么解决
页:
[1]