51Testing软件测试论坛

标题: LR12中Java over http 协议录制自带订票,outboundFlight和returnFlight关联不到。 [打印本页]

作者: tianqingyundan    时间: 2014-12-1 11:01
标题: LR12中Java over http 协议录制自带订票,outboundFlight和returnFlight关联不到。
LR12中Java over http 协议录制自带订票,outboundFlight和returnFlight关联不到。
     web.reg_save_param ("S_outboundFlight",

    new String []{

        "LB=outboundFlight\" value=\"",

        "RB=\" checked" ,

        "LAST"} );


    web.reg_save_param ("S_returnFlight",

    new String []{

        "LB=returnFlight value=",

        "RB= checked" ,

        "LAST"} );

    _webresult = lrapi.web.submit_data("reservations.pl_2",
        "Action=http://127.0.0.1:1080/cgi-bin/reservations.pl", new String[]{
        "Method=POST",
        "TargetFrame=",
        "RecContentType=text/html",
        "Referer=http://127.0.0.1:1080/cgi-bin/reservations.pl",
        "Snapshot=t18.inf",
        "Mode=HTML",
        }, new String[]{ // ITEM DATA
        "Name=outboundFlight", "Value={S_outboundFlight}", ENDITEM,
        "Name=returnFlight", "Value={S_returnFlight}", ENDITEM,
        "Name=numPassengers", "Value=1", ENDITEM,
        "Name=advanceDiscount", "Value=0", ENDITEM,
        "Name=seatType", "Value=Coach", ENDITEM,
        "Name=seatPref", "Value=None", ENDITEM,
        "Name=reserveFlights.x", "Value=65", ENDITEM,
        "Name=reserveFlights.y", "Value=7", ENDITEM,
        LAST});
错误:Error -26377: No match found for the requested parameter "S_outboundFlight". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 1024 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-26377]
Error -26377: No match found for the requested parameter "S_returnFlight". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 1024 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-26377]


作者: femir    时间: 2014-12-2 10:32
这个是你的关联函数位置放错了,web.reg_save_param ()这个函数必须放在你请求的当前页面的前面,意思就是放在“” 这个URL请求页面,在不清楚看按F1 看帮助文档
作者: tianqingyundan    时间: 2014-12-2 11:00
femir 发表于 2014-12-2 10:32
这个是你的关联函数位置放错了,web.reg_save_param ()这个函数必须放在你请求的当前页面的前面,意思就是 ...

多谢,12和11还是有很多不同的




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