|
我把登录放在init里面,然后参数化登录的用户名,把里面填报页面的动作放在Action里面,回放时不成功,是否是填报页面的session未获取到啊?
下面是我的脚本:
vuser_init()
{
web_set_max_html_param_len("1024");
/* Registering parameter(s) from source task id 2
// {Siebel_Analytic_ViewState2} = "/wEPDwUKLTI5ODM3NjExN2RkjUBcQcHncAZi/3rJKmAzIv61dPE="
// */
web_reg_save_param("Siebel_Analytic_ViewState2",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
web_url("Login.aspx",
"URL=http://192.168.5.117:85/Authentication/Login.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=../WebResource.axd?d=CvzYHb4BTDj1AxWusb8TyA2&t=633698821951078750", ENDITEM,
LAST);
lr_think_time( 24 );
web_submit_data("Login.aspx_2",
"Action=http://192.168.5.117:85/Authentication/Login.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.5.117:85/Authentication/Login.aspx",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState2}", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$tesc_username", "Value={orgCode}", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$tesc_userpassword", "Value=11111111", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$tesc_yanzhengma", "Value=vafezs", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$btnLogin", "Value=登录", ENDITEM,
"Name=ctl00$tbxTitleEventEntry", "Value=", ENDITEM,
"Name=__EVENTVALIDATION", "Value=/wEWBwLw8JPCAwLP4KMJAr2K9qkLArip+NgKAo7175EBAtDA964PAoeritsDR07aKI5AY7pT0neyqkks0wCtwyw=", ENDITEM,
EXTRARES,
"Url=../App_Themes/Default/images/DF1.jpg", "Referer=http://192.168.5.117:85/Stat/Default.aspx", ENDITEM,
LAST);
return 0;
}
Action()
{
web_url("StatServices.aspx",
"URL=http://192.168.5.117:85/Stat/StatServices.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.5.117:85/Stat/Default.aspx",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=../App_Themes/Default/images/DF1.jpg", ENDITEM,
LAST);
lr_think_time( 5 );
/* Registering parameter(s) from source task id 57
// {Siebel_Analytic_ViewState6} = "/wEPDwULLTE2MzkyMzc2ODAPFgIeCUlzTmV3Rm9ybWgWAmYPZBYCAgMPZBYGAgMPDxYCHgRUZXh0BQUxMTExMWRkAgUPZBYCAgEPDxYCHwEFHDIwMDnlubQwNOaciDIz5pelIOasoui/juaCqCBkZAIHD2QWAgIBD2QWAmYPZBYYAgEPDxYCHwEFBDIwMDhkZAIDDw8WAh8BBQo2MDczMjIyMy0zZGQCBQ8PFgIfAWRkZAKLAg8QZBAVBAzor7fpgInmi6kuLi4G5rW35aSWEuWbveWGheWFtuS7luecgeW4ggbmnKzluIIVBAMwMDAGODg4ODg4Bjg2MDAwMAMzMTAUKwMEZ2dnZxYBAgNkAo0CDxBkEBUUDOivt+mAieaLqS4uLgnpu4TmtabljLoJ5Y2i5rm+5Yy6CeW+kOaxh+WMugnplb/lroHljLoJ6Z2Z5a6J5Yy6CeaZrumZgOWMugnpl7jljJfljLoJ6Jm55Y+j5Yy6CeadqOa1puWMugnpl7XooYzljLoJ5a6d5bGx5Yy6CeWYieWumuWMugzmtabkuJzmlrDljLoJ6YeR5bGx5Yy6CeWNl+axh+WMugnlpYnotKTljLoJ5p2+5rGf5Yy6Cemdkua1puWMugnltIfmmI7ljr8VFAQwMDAwBjMxMDEwMQYzMTAxMDMGMzEwMTA0BjMxMDEwNQYzMTAxMDYGMzEwMTA3BjMxMDEwOAYzMTAxMDkGMzEwMTEwBjMxMDExMgYzMTAxMTMGMzEwMTE0BjMxMDExNQY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ugnpl7XooYzljLoJ5a6d5bGx5Yy6CeWYieWumuWMugzmtabkuJzmlrDljLoJ6YeR5bGx5Yy6CeWNl+axh+WMugnlpYnotKTljLoJ5p2+5rGf5Yy6Cemdkua1puWMugnltIfmmI7ljr8VFAQwMDAwBjMxMDEwMQYzMTAxMDMGMzEwMTA0BjMxMDEwNQYzMTAxMDYGMzEwMTA3BjMxMDEwOAYzMTAxMDkGMzEwMTEwBjMxMDExMgYzMTAxMTMGMzEwMTE0BjMxMDExNQYzMTAxMTYGMzEwMjI1BjMxMDIyNgYzMTAyMjcGMzEwMjI5BjMxMDIzMBQrAxRnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZxYBAgdkApsCDw8WAh8BBQYzMTAxMDhkZGR0pw1HbNeWvN9zD+HjhWzNvxeHew=="
// */
web_reg_save_param("Siebel_Analytic_ViewState6",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
web_link("填报",
"Text=填报",
"Snapshot=t4.inf",
EXTRARES,
"Url=../App_Themes/Default/images/DF1.jpg", ENDITEM,
LAST);
web_set_max_html_param_len("2376");
web_submit_data("techsurvey.aspx",
"Action=http://192.168.5.117:85/Stat/techsurvey.aspx",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://192.168.5.117:85/Stat/techsurvey.aspx",
"Mode=HTML",
ITEMDATA,
"Name=ctl00$ScriptManager1", "Value=ctl00$ContentPlaceHolder1$UpdatePanel1|ctl00$ContentPlaceHolder1$btnSave", ENDITEM,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__LASTFOCUS", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState6}", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$tesc_01", "Value=1001", ENDITEM,
"Name=ctl00$tbxTitleEventEntry", "Value=", ENDITEM,
"Name=__SCROLLPOSITIONX", "Value=0", ENDITEM,
"Name=__SCROLLPOSITIONY", "Value=593", ENDITEM,
"Name=__EVENTVALIDATION", "Value=/wEWegL+zcbECwKWue+bAQK7upyIDALBurDjBAK8upyIDAKyurDjBAK9upyIDAK+upyIDAKzurDjBAK/upyIDAK6uvTRCgLAupyIDAK7uvTRCgK8uvTRCgLBupyIDAKyupyIDAK9uvTRCgKzupyIDAK+uvTRCgK6urDjBAK/uvTRCgK7urDjBALAuvTRCgK8urDjBALBuvTRCgK9urDjBAKyuvTRCgKzuvTRCgK+urDjBAK6uoitAwK/urDjBAK7uoitAwLAurDjBAK8uoitAwK7uvDfDQK6/o+sAwKQ0IKWCAKystb7DALi69+2CAKd0IaWCALpwrbsBALD7PvrBAKk0fquBgKk0eKuBgKk0fauBgKk0YquBgKk0f6uBgKk0fKuBgKk0YauBgKk0ZquBgKn0eauBgKn0e6uBgKn0eKuBgKn0fauBgKn0YquBgKn0f6uBgKi0Z6LDQKi0YKLDQKi0YaLDQKi0a6LDQKl0YqLDQK7/o+sAwKR0IKWCAKzstb7DALj69+2CAKc0IaWCALqwrbsBALA7PvrBAKn0fquBgKn0eKuBgKn0fauBgKn0YquBgKn0f6uBgKn0fKuBgKn0YauBgKn0ZquBgKk0eauBgKk0e6uBgKk0eKuBgKk0fauBgKk0YquBgKk0f6uBgKh0Z6LDQKh0YKLDQKh0YaLDQKh0a6LDQKm0YqLDQK8/o+sAwKW0IKWCAK0stb7DALk69+2CAKb0IaWCALrwrbsBALB7PvrBAKm0fquBgKm0eKuBgKm0fauBgKm0YquBgKm0f6uBgKm0fKuBgKm0YauBgKm0ZquBgKl0eauBgKl0e6uBgKl0eKuBgKl0fauBgKl0YquBgKl0f6uBgKg0Z6LDQKg0YKLDQKg0YaLDQKg0a6LDQKn0YqLDQKx8JKCCQKCrOzBBwLnws6sDQK4/qfsCwKokaLfCgKC6KGpBgL40JWiCgLQwPeuDwKHq4rbA/nkpIXnJOuC++0MvDcWIPsPwkcT", ENDITEM,
"Name=ctl00$ContentPlaceHolder1$btnSave", "Value=保存", ENDITEM,
EXTRARES,
"Url=../ScriptResource.axd?d=5oF26sQQPE-WpL1ik1X6570z8dOTm4wJwEQs4eQkxIPcQNJRI1I6Ix8QOQsXNCu6E8YSZjhWfPdEGHc7qonIjQ2&t=633698821951078750", ENDITEM,
LAST);
return 0;
} |
|