51Testing软件测试论坛
标题:
获取数组值
[打印本页]
作者:
superliming
时间:
2010-8-12 14:23
标题:
获取数组值
int arrSize;
int i;
char * FlightVal;
web_reg_save_param("outFlightVal",
"LB=outboundFlight value=", "RB=>",
"ORD=ALL",
"SaveLen=18",
LAST );
web_submit_form("reservations.pl",
"Snapshot=t4.inf",
ITEMDATA,
"Name=depart", "Value=London", ENDITEM,
"Name=departDate", "Value=11/20/2003", ENDITEM,
"Name=arrive", "Value=New York", ENDITEM,
"Name=returnDate", "Value=11/21/2003", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value=None", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=findFlights.x", "Value=83", ENDITEM,
"Name=findFlights.y", "Value=16", ENDITEM,
LAST );
/*
The result of the web_reg_save_param having been called before the web_submit_form is:
Notify: Saving Parameter "outFlightVal_1 = 230;378;11/20/2003"
Notify: Saving Parameter "outFlightVal_2 = 231;337;11/20/2003"
Notify: Saving Parameter "outFlightVal_3 = 232;357;11/20/2003"
Notify: Saving Parameter "outFlightVal_4 = 233;309;11/20/2003"
Notify: Saving Parameter "outFlightVal_count = 4"
*/
arrSize = lr_paramarr_len("outFlightVal");
for(i=1;i<=arrSize;i++)
{
FlightVal = lr_paramarr_idx("outFlightVal", i);
}
作者:
云层
时间:
2010-8-12 15:08
写这个帖子没头没尾想说明啥呢?难道给自己留个印子?
作者:
msnshow
时间:
2010-10-30 09:34
很明显是这样的
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2