验证页面通过, 页面下载, 事物成功:
web_get_int_property:
returns specific information about the previous HTTP request
Action()
{
int HttpRetCode;
int HttpRetDowLoadSize;
web_url("my_home",
"URL=http://../my_home",
"Resource=0",
"RecContentType=text/html",
"Referer=http://...",
"Snapshot=...inf",
"Mode=HTTP",
LAST);
//verify the page whether return successfully:
HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE);
if (HttpRetCode == 200)
lr_log_message("The script successfully accessed the My_home home page");
else
lr_log_message("The script failed to access the My_home home page ");
//verify the page whether download sucessfully:
HttpRetDowLoadSize = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
if (HttpRetDowLoadSize > 0)
{
lr_log_message("The script successfully download the My_home home page");
}
else
{
lr_log_message("The script failed to download the My_home home page "
}
//verify the transaction of page whether download sucessfully:
HttpRetDowLoadSize = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
if (HttpRetDowLoadSize > 0)
{
lr_end_transaction("download",LR_AUTO);
}
else
{
lr_end_transaction("download",LR_FAIL);
}
return 0;
}