|
用webtour做例子:
web_reg_find("Fail=NotFound",
"Search=Body",
"Text=to the Web Tours reservation pages",
LAST);
web_submit_form("login.pl",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=login.x", "Value=39", ENDITEM,
"Name=login.y", "Value=8", ENDITEM,
LAST);
结果:Registered web_reg_find successful for "Text=to the Web Tours reservation pages" (count=1)
接下来:web_submit_data
web_reg_find("Fail=NotFound",
"Search=Body",
"Text=to the Web Tours reservation pages",
LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=108371.82308627ffHtDHfpzfDDttzpcfDQ", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=39", ENDITEM,
"Name=login.y", "Value=15", ENDITEM,
LAST);
结果:Continuing after Error -26366: "Text=to the Web Tours reservation pages" not found for web_reg_find
请问这是为什么呢?
而且,录制脚本都是用lr11,xp。为什么一个录制成submit_form,一个录制成submit_data呢? |
|