|
我用java vuser 写了一个脚本测试web 页面,脚本如下
import lrapi.lr;
public class Actions
{
public int init() throws Throwable {
return 0;
}//end of init
public int action() throws Throwable {
web.url("test",
"URL=http://172.16.0.216:8001/shopping/client/jsp/login.jsp",
new String[]{
"TargetFrame=",
"TargetBrowser=Mercury Technologies",
"Resource=0",
"RecContentType=text/html",
"Snapshot=t1.inf",
"Mode=HTML",
"LAST"
});
// web.url("shppingLogin",
// "URL=http://172.16.0.216:8001/shopping/client/jsp/login.jsp",
// new String[]{
// "TargetFrame=",
// "TargetBrowser=Mercury Technologies",
// "Resource=0",
// "RecContentType=text/html",
// "Snapshot=t1.inf",
// "Mode=HTML",
// "LAST"
// });
//
// web.submit_data("login",
// "Action=http://172.16.0.216:8001/shopping//client/loginByPwd.do",
// new String[]{ //options[]
// "Method=POST",
// "RecContentType=text/html",
// "Referer=http://172.16.0.216:8001/shopping/client/jsp/login.jsp",
// "Mode=HTML"
//
// },
// new String[]{ //data[]
// "Name=acc", "Value=jzinvest",web.ENDITEM,
// "Name=pw", "Value=c4ca4238a0b923820dcc509a6f75849b", web.ENDITEM,
// web.LAST
// });
return 0;
}//end of action
public int end() throws Throwable {
return 0;
}//end of end
}
编译是报错 web.url 找不到符号 ,是不是需要导入什么包?
|
|