675180802wlx 发表于 2015-5-30 09:01:53

生成的数据都一样,求帮助

Action()
{

        lr_start_transaction("购票");

        lr_think_time(18);

        web_reg_find("Text=Find Flight",
                LAST);


        web_submit_data("reservations.pl_2",
                "Action=http://127.0.0.1:1080/WebTours/reservations.pl",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/reservations.pl?page=welcome",
                "Snapshot=t45.inf",
                "Mode=HTTP",
                ITEMDATA,
                "Name=advanceDiscount", "Value=0", ENDITEM,
                "Name=depart", "Value=Denver", ENDITEM,
                "Name=departDate", "Value=05/28/2015", ENDITEM,
                "Name=arrive", "Value={arrive}", ENDITEM,
                "Name=returnDate", "Value=05/29/2015", ENDITEM,
                "Name=numPassengers", "Value=1", ENDITEM,
                "Name=seatPref", "Value={seatPref}", ENDITEM,
                "Name=seatType", "Value={seatType}", ENDITEM,
                "Name=.cgifields", "Value=roundtrip", ENDITEM,
                "Name=.cgifields", "Value=seatType", ENDITEM,
                "Name=.cgifields", "Value=seatPref", ENDITEM,
                "Name=findFlights.x", "Value=52", ENDITEM,
                "Name=findFlights.y", "Value=10", ENDITEM,
                LAST);

        web_submit_data("reservations.pl_3",
                "Action=http://127.0.0.1:1080/WebTours/reservations.pl",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/reservations.pl",
                "Snapshot=t46.inf",
                "Mode=HTTP",
                ITEMDATA,
                "Name=outboundFlight", "Value=010;386;05/28/2015", ENDITEM,
                "Name=numPassengers", "Value=1", ENDITEM,
                "Name=advanceDiscount", "Value=0", ENDITEM,
                "Name=seatType", "Value={seatType}", ENDITEM,
                "Name=seatPref", "Value={seatPref}", ENDITEM,
                "Name=reserveFlights.x", "Value=37", ENDITEM,
                "Name=reserveFlights.y", "Value=6", ENDITEM,
                LAST);

        web_submit_data("reservations.pl_4",
                "Action=http://127.0.0.1:1080/WebTours/reservations.pl",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/reservations.pl",
                "Snapshot=t47.inf",
                "Mode=HTTP",
                ITEMDATA,
                "Name=firstName", "Value=Joseph", ENDITEM,
                "Name=lastName", "Value=Marshall", ENDITEM,
                "Name=address1", "Value=234 Willow Drive", ENDITEM,
                "Name=address2", "Value=San Jose/CA/94085", ENDITEM,
                "Name=pass1", "Value=Joseph Marshall", ENDITEM,
                "Name=creditCard", "Value=123456", ENDITEM,
                "Name=expDate", "Value=01/16", ENDITEM,
                "Name=saveCC", "Value=on", ENDITEM,
                "Name=oldCCOption", "Value=on", ENDITEM,
                "Name=numPassengers", "Value=1", ENDITEM,
                "Name=seatType", "Value={seatType}", ENDITEM,
                "Name=seatPref", "Value={seatPref}", ENDITEM,
                "Name=outboundFlight", "Value=010;386;05/28/2015", ENDITEM,
                "Name=advanceDiscount", "Value=0", ENDITEM,
                "Name=returnFlight", "Value=", ENDITEM,
                "Name=JSFormSubmit", "Value=off", ENDITEM,
                "Name=.cgifields", "Value=saveCC", ENDITEM,
                "Name=buyFlights.x", "Value=39", ENDITEM,
                "Name=buyFlights.y", "Value=7", ENDITEM,
                LAST);

        web_url("bookanother.gif",
                "URL=http://127.0.0.1:1080/WebTours/images/bookanother.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://127.0.0.1:1080/WebTours/reservations.pl",
                "Snapshot=t48.inf",
                LAST);

        lr_end_transaction("购票", LR_AUTO);

        lr_think_time(5);

        web_url("welcome.pl_2",
                "URL=http://127.0.0.1:1080/WebTours/welcome.pl?page=itinerary",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=flights",
                "Snapshot=t49.inf",
                "Mode=HTTP",
                LAST);

        web_concurrent_start(NULL);

        web_url("itinerary.pl",
                "URL=http://127.0.0.1:1080/WebTours/itinerary.pl",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/welcome.pl?page=itinerary",
                "Snapshot=t50.inf",
                "Mode=HTTP",
                LAST);

        web_url("nav.pl_4",
                "URL=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=itinerary",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://127.0.0.1:1080/WebTours/welcome.pl?page=itinerary",
                "Snapshot=t51.inf",
                "Mode=HTTP",
                LAST);

        web_concurrent_end(NULL);

        web_url("in_itinerary.gif",
                "URL=http://127.0.0.1:1080/WebTours/images/in_itinerary.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=itinerary",
                "Snapshot=t52.inf",
                LAST);

        web_concurrent_start(NULL);

        web_url("cancelallreservations.gif",
                "URL=http://127.0.0.1:1080/WebTours/images/cancelallreservations.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://127.0.0.1:1080/WebTours/itinerary.pl",
                "Snapshot=t53.inf",
                LAST);

        web_url("cancelreservation.gif",
                "URL=http://127.0.0.1:1080/WebTours/images/cancelreservation.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://127.0.0.1:1080/WebTours/itinerary.pl",
                "Snapshot=t54.inf",
                LAST);

        web_concurrent_end(NULL);

return 0;
}
页: [1]
查看完整版本: 生成的数据都一样,求帮助