|
录制B/S结构的系统。
选择协议:http
录制过程很顺利,但是录制后发现在登录过程中脚本中,只有发送数据,没有服务器返回数据。
脚本回放,观察浏览页面,没有数据显现,page页只是一个框架。
登录action如下:通过用户判断权限与角色。
Action()
{
web_submit_data("Login.aspx",
"Action=http://192.168.9.49/AMS/Pages/Login.aspx?ReturnUrl=%2fAMS%2fDefault.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.9.49/AMS/Pages/Login.aspx?ReturnUrl=%2fAMS%2fDefault.aspx",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState2}", ENDITEM,
"Name=txtUid", "Value=admin", ENDITEM,
"Name=txtPwd", "Value=123", ENDITEM,
"Name=btnLogin", "Value=Login", ENDITEM,
"Name=__EVENTVALIDATION", "Value=/wEWBQLJjcg3Av/61tUCAp37up0OAoLch4YMApD0z+sFP89HDhPau2UuK4dkWGkCCJQmljU=", ENDITEM,
EXTRARES,
"Url=../_Javascript/mootools.js", "Referer=http://192.168.9.49/AMS/Pages/index.html", ENDITEM,
"Url=../_Style/common.css", "Referer=http://192.168.9.49/AMS/Pages/cp_frame.html", ENDITEM,
"Url=../_Style/basic.css", "Referer=http://192.168.9.49/AMS/Pages/cp_frame.html", ENDITEM,
"Url=../_Images/footer_back.jpg", "Referer=http://192.168.9.49/AMS/Pages/cp_frame.html", ENDITEM,
"Url=../_Images/nav_back.jpg", "Referer=http://192.168.9.49/AMS/Pages/top_frame.html", ENDITEM,
"Url=../_Images/header_back.jpg", "Referer=http://192.168.9.49/AMS/Pages/top_frame.html", ENDITEM,
"Url=../_Images/nav_back_2.gif", "Referer=http://192.168.9.49/AMS/Pages/left_frame.html", ENDITEM,
"Url=../_Images/blue_direct.gif", "Referer=http://192.168.9.49/AMS/Pages/left_frame.html", ENDITEM,
"Url=../_Images/hide.gif", "Referer=http://192.168.9.49/AMS/Pages/left_frame.html", ENDITEM,
"Url=../_Images/show.gif", "Referer=http://192.168.9.49/AMS/Pages/left_frame.html", ENDITEM,
"Url=../_Images/active_back_left.jpg", "Referer=http://192.168.9.49/AMS/Pages/top_frame.html", ENDITEM,
"Url=../_Images/active_back_right.jpg", "Referer=http://192.168.9.49/AMS/Pages/top_frame.html", ENDITEM,
"Url=../_Images/normal_back_left.jpg", "Referer=http://192.168.9.49/AMS/Pages/top_frame.html", ENDITEM,
"Url=../_Images/normal_back_right.jpg", "Referer=http://192.168.9.49/AMS/Pages/top_frame.html", ENDITEM,
"Url=../_Images/nav_back_active_2.gif", "Referer=http://192.168.9.49/AMS/Pages/left_frame.html", ENDITEM,
LAST);
web_submit_data("menus.aspx",
"Action=http://192.168.9.49/AMS/Pages/Menu/menus.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.9.49/AMS/Pages/top_frame.html",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
LAST);
web_submit_data("user.aspx",
"Action=http://192.168.9.49/AMS/Pages/Menu/user.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.9.49/AMS/Pages/top_frame.html",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
LAST);
web_submit_data("role.aspx",
"Action=http://192.168.9.49/AMS/Pages/Menu/role.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.9.49/AMS/Pages/top_frame.html",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
LAST);
return 0;
} |
|