脚本里面有2个函数,解释一下:1.几个函数的解释:
1)intweb_url(const char *Name, const char *url, <List of Attributes>,
[EXTRARES, <List of Resource Attributes>,] LAST );
这个函数load指定的web页面.
*Name:页面的name;
l url:页面的url,Resource:指示the URL是否是一个资源。0,不是,1,是。
l RecContentType:录制脚本过程中,Header响应的类型,e.g.text/html,application/x- javascrīpt
l Referer–参考web页的the URL
l Snapshot- snapshot文件名(扩展名inf), correlation的时候要的。
l Mode–录制的级别: HTML or HTTP
l Last- 属性列表的结束标志。
2) intweb_submit_data( const char *StepName,//页面文件名,<List of attributes>,
ITEMDATA,//Item数据
<List of data>,
[ EXTRARES, <List of Resource Attributes>,]
LAST );
这个函数以GET and POST requests方式发送form。
*StepName:
这里有个例子, theweb_submit_datafunction submits a form using the POST method:
web_submit_data("customerinfo.asp",
"Action=http://lazarus/webflight/customerinfo.asp",
"Method=POST",
"TargetFrame=",
"EncType=multipart/www-urlencoded"
"RecContentType=text/html"
ITEMDATA,
"name=flight", "value=6593", ENDITEM,
"name=reserveFlight", "value=Next >",ENDITEM,
LAST);