|
Action()
{
web_reg_find("Text=Mercury Tours",
LAST);
web_url("mercuryWebTours",
"URL=http://localhost:1080/mercuryWebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(5);
web_submit_data("login.pl",
"Action=http://localhost:1080/mercuryWebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:1080/mercuryWebTours/nav.pl?in=home",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=99243.7721344674fVAtifVpfcQVzzzHDAzcQpVAQVHf", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
LAST);
web_reg_find("Text=Mercury Tours",
LAST);
web_submit_data("login.pl_2",
"Action=http://localhost:1080/mercuryWebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:1080/mercuryWebTours/nav.pl?in=home",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=99243.7721344674fVAtifVpfcQVzzzHDAzcQpVAQVHf", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=0", ENDITEM,
"Name=login.y", "Value=0", ENDITEM,
LAST);
return 0;
}
这是我录制的代码,如果在录制前我已经将"Save snapshot resources locally"清楚选中,录制的代买中就只有一个web_submit_data,可是这个函数中还是有snapshot,这是为什么?还有snapshot有什么用处?在所贴出来的代码中,上面的web_submit_data和下面的web_submint_data作用上有什么不同?还有其中的login.pl和login.pl_2是什么文件啊
[ 本帖最后由 lushuishui 于 2008-10-28 11:56 编辑 ] |
|