TA的每日心情 | 擦汗 2016-3-16 15:27 |
---|
签到天数: 25 天 连续签到: 1 天 [LV.4]测试营长
|
4#
楼主 |
发表于 2013-1-30 17:31:07
|
只看该作者
回复 2# superfang
以下是脚本,参数化后就报这个错误,应该是图片验证的问题,但是不知道怎么解决,请看代码:
Action()
{
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(7);
web_submit_form("login.pl",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value={NewParam}", ENDITEM, //参数化的用户名
"Name=password", "Value=bean", ENDITEM,
"Name=login.x", "Value=73", ENDITEM,
"Name=login.y", "Value=16", ENDITEM,
LAST);
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t3.inf",
LAST);
lr_think_time(7);
web_submit_form("reservations.pl",
"Snapshot=t4.inf",
ITEMDATA,
"Name=depart", "Value=Denver", ENDITEM,
"Name=departDate", "Value=01/31/2013", ENDITEM,
"Name=arrive", "Value=London", ENDITEM,
"Name=returnDate", "Value=02/01/2013", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value=Window", ENDITEM,
"Name=seatType", "Value=First", ENDITEM,
"Name=findFlights.x", "Value=60", ENDITEM,
"Name=findFlights.y", "Value=4", ENDITEM,
LAST);
web_submit_form("reservations.pl_2",
"Snapshot=t5.inf",
ITEMDATA,
"Name=outboundFlight", "Value=022;600;01/31/2013", ENDITEM,
"Name=reserveFlights.x", "Value=45", ENDITEM,
"Name=reserveFlights.y", "Value=9", ENDITEM,
LAST);
lr_think_time(6);
web_submit_form("reservations.pl_3",
"Snapshot=t6.inf",
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=11111111111111111111", ENDITEM,
"Name=expDate", "Value=", ENDITEM,
"Name=saveCC", "Value=<OFF>", ENDITEM,
"Name=buyFlights.x", "Value=41", ENDITEM,
"Name=buyFlights.y", "Value=4", ENDITEM,
LAST);
web_submit_form("reservations.pl_4",
"Snapshot=t7.inf",
ITEMDATA,
"Name=Book Another.x", "Value=37", ENDITEM,
"Name=Book Another.y", "Value=11", ENDITEM,
LAST);
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t8.inf",
LAST);
return 0;
} |
|