|
3#
楼主 |
发表于 2008-11-25 12:47:09
|
只看该作者
脚本如下
脚本如下:多谢楼上
#include "web_api.h"
Action()
{
web_url("index.do",
"URL=http://119.255.1.54:9080/admin/index.do",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=images/login_03.jpg", ENDITEM,
LAST);
lr_think_time( 6 );
web_submit_form("loginAction.do",
"Snapshot=t2.inf",
ITEMDATA,
"Name=userName", "Value=mepaytest", ENDITEM,
"Name=password", "Value=mepaytest", ENDITEM,
"Name=submit", "Value=login", ENDITEM,
EXTRARES,
"Url=images/top_bg.jpg", "Referer=http://119.255.1.54:9080/admin/head.do", ENDITEM,
"Url=images/LeftBg.jpg", "Referer=http://119.255.1.54:9080/admin/left.do", ENDITEM,
LAST);
lr_think_time( 1 );
web_link("add admin",
"Text=add admin",
"Snapshot=t3.inf",
EXTRARES,
"Url=../images/ButtonBg.jpg", ENDITEM,
LAST);
lr_think_time( 15 );
web_submit_form("save.do",
"Snapshot=t4.inf",
ITEMDATA,
"Name=admin.name", "Value={name}", ENDITEM,
"Name=admin.password", "Value=123123", ENDITEM,
"Name=password2", "Value=123123", ENDITEM,
"Name=admin.actualname", "Value=", ENDITEM,
"Name=admin.telephone", "Value=", ENDITEM,
"Name=groupId", "Value=13", ENDITEM,
"Name=admin.state", "Value=Active", ENDITEM,
EXTRARES,
"Url=../images/Gbg.jpg", ENDITEM,
"Url=../images/ButtonBg.jpg", ENDITEM,
LAST);
lr_think_time( 1 );
web_link("[Log out ]",
"Text=[Log out ]",
"Snapshot=t5.inf",
LAST);
web_url("quitAction.do",
"URL=http://119.255.1.54:9080/admin/quitAction.do",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t6.inf",
"Mode=HTML",
EXTRARES,
"Url=images/login_03.jpg", ENDITEM,
LAST);
return 0; |
|