|
Action()
{
web_url("login", //打开登录的页面
"URL=http://www.smr/system/login/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
lr_think_time(10);
lr_rendezvous("login");
lr_start_transaction("login"); //事务开始
web_submit_form("index.html_2", //提交登录的用户信息表单
"Snapshot=t3.inf",
ITEMDATA,
"Name=ocUname", "Value={user}", ENDITEM,
"Name=ocPword", "Value={pswd}", ENDITEM,
"Name=ocOuSearch", "Value=Search organizational unit", ENDITEM,
LAST);
lr_end_transaction("login", LR_PASS); //提交用户信息后就算登录事务的结束吗?
web_url("workplace.jsp", //加载登录成功后显示的首页信息
"URL=http://http://www.smr/system/workplace/views/workplace.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"Url=/opencms/resources/buttons/publish_in.png", "Referer=http://http://www.smr/system/workplace/views/top_head.jsp?wpFrame=head", ENDITEM,
"Url=/opencms/resources/buttons/publish_queue.png", "Referer=http://http://www.smr/system/workplace/views/top_head.jsp?wpFrame=head", ENDITEM,
"Url=/opencms/resources/buttons/reload.png", "Referer=http://http://www.smr/system/workplace/views/top_head.jsp?wpFrame=head", ENDITEM,
"Url=/opencms/resources/buttons/preferences.png", "Referer=http://http://www.smr/system/workplace/views/top_head.jsp?wpFrame=head", ENDITEM,
"Url=/opencms/resources/buttons/help.png", "Referer=http://http://www.smr/system/workplace/views/top_head.jsp?wpFrame=head", ENDITEM,
"Url=/opencms/resources/buttons/logout.png", "Referer=http://http://www.smr/system/gin/workplace/views/top_head.jsp?wpFrame=head", ENDITEM,
"Url=/opencms/resources/commons/workplace.png", "Referer=http://http://www.smr/system/workplace/views/top_head.jsp?wpFrame=head", ENDITEM,
"Url=/opencms/resources/explorer/project_none.gif", "Referer=http://http://www.smr/system/workplace/views/explorer/explorer_files.jsp?mode=explorerview", ENDITEM,
"Url=/opencms/resources/commons/explorer.css", "Referer=http://http://www.smr/system/workplace/views/explorer/explorer_files.jsp?mode=explorerview", ENDITEM,
"Url=/opencms/resources/filetypes/folder.gif", "Referer=http://http://www.smr/system/workplace/views/explorer/explorer_files.jsp?mode=explorerview", ENDITEM,
"Url=/opencms/resources/filetypes/configfolder.png", "Referer=http://http://www.smr/system/workplace/views/explorer/explorer_files.jsp?mode=explorerview", ENDITEM,
"Url=/opencms/resources/filetypes/containerpage.png", "Referer=http://http://www.smr/system/workplace/views/explorer/explorer_files.jsp?mode=explorerview", ENDITEM,
"Url=/opencms/resources/filetypes/subsitemap.png", "Referer=http://http://www.smr/system/workplace/views/explorer/explorer_files.jsp?mode=explorerview", ENDITEM,
"Url=/opencms/resources/buttons/wizard_in.png", "Referer=http://http://www.smr/system/workplace/views/explorer/explorer_files.jsp?mode=explorerview", ENDITEM,
"Url=/opencms/resources/buttons/ex_search.png", "Referer=http://http://www.smr/system/workplace/views/explorer/explorer_files.jsp?mode=explorerview", ENDITEM,
"Url=/opencms/resources/buttons/back.png", "Referer=http://http://www.smr/system/workplace/views/explorer/explorer_files.jsp?mode=explorerview", ENDITEM,
"Url=/opencms/resources/buttons/upload_in.png", "Referer=http://http://www.smr/system/workplace/views/explorer/explorer_files.jsp?mode=explorerview", ENDITEM,
"Url=/opencms/resources/buttons/folder_up_in.png", "Referer=http://http://www.smr/system/workplace/views/explorer/explorer_files.jsp?mode=explorerview", ENDITEM,
"Url=/opencms/resources/tree/start.gif", "Referer=http://http://www.smr/system/workplace/views/explorer/tree_files.jsp?resource=/", ENDITEM,
"Url=/opencms/resources/tree/upcross.gif", "Referer=http://http://www.smr/system/workplace/views/explorer/tree_files.jsp?resource=/", ENDITEM,
"Url=/opencms/resources/tree/ufolder.gif", "Referer=http://http://www.smr/system/workplace/views/explorer/tree_files.jsp?resource=/", ENDITEM,
"Url=/opencms/resources/tree/upend.gif", "Referer=http://http://www.smr/system/workplace/views/explorer/tree_files.jsp?resource=/", ENDITEM,
LAST);
lr_end_transaction("login", LR_PASS); //还是登录成功后首页加载完成算登录事务的结束点呢?
web_find("web_find",
"What=Exit",
LAST);
return 0;
}
请教一个问题,上面的代码是录制一个浏览器页面的登录操作的脚本,现在我有个疑惑,登录这个操作的事物的结束点在哪里?
是提交用户登录信息的表单后就结束事务还是加载完登录成功后的首页呢?
可能问题很菜,但请帮忙解答,多谢。 |
|