|
- Action()
- {
- web_url("Login.aspx",
- "URL=http://10.11.11.111/libraryMS/Login.aspx",
- "Resource=0",
- "RecContentType=text/html",
- "Referer=",
- "Snapshot=t1.inf",
- "Mode=HTML",
- LAST);
- lr_start_transaction("login");
- web_submit_form("Login.aspx_2",
- "Snapshot=t2.inf",
- ITEMDATA,
- "Name=txtAdmin", "Value=tsoft", ENDITEM,
- "Name=txtPwd", "Value=111", ENDITEM,
- "Name=txtCode", "Value=", ENDITEM,
- "Name=btnLogin", "Value=登录", ENDITEM,
- EXTRARES,
- "URL=../LibraryMS/WebResource.axd?d=sQsZ8AfHHfX5j7Lh0K2vYg2&t=633936346575142915", "Referer=http://10.1.16.89/libraryMS/Default.aspx", ENDITEM,
- "URL=../LibraryMS/WebResource.axd?d=kEe3vR9BO-LC5GNwMzINFw2&t=633936346575142915", "Referer=http://10.1.16.89/libraryMS/Default.aspx", ENDITEM,
- "URL=../images/index_14.gif", "Referer=http://10.1.16.89/libraryMS/Default.aspx", ENDITEM,
- LAST);
- lr_end_transaction("login", LR_AUTO);
- lr_think_time(4);
- web_link("图书借阅查询",
- "Text=图书借阅查询",
- "Snapshot=t3.inf",
- LAST);
- lr_start_transaction("query");
- lr_think_time(6);
- web_reg_find ("Text=111111","SaveCount=111111_Count",LAST);
- web_submit_form("BBorrowQuery.aspx",
- "Snapshot=t4.inf",
- ITEMDATA,
- "Name=ctl00$ContentPlaceHolder1$ddlCondition", "Value=图书条形码", ENDITEM,
- "Name=ctl00$ContentPlaceHolder1$txtCondition", "Value=111111", ENDITEM,
- "Name=ctl00$ContentPlaceHolder1$btnQuery", "Value=查询", ENDITEM,
- LAST);
-
-
- if (atoi(lr_eval_string("{111111_Count}")) > 0){ //判断如果Welcome字符串出现次数大于0
- lr_output_message("Log on successful."); }//在日志中输出Log on successful
- else{ //如果出现次数小于等于
- lr_error_message("Log on failed"); //在日志中输出Log on failed
- return(0);
- }
- lr_end_transaction("query", LR_AUTO);
- return 0;
- }
复制代码
代码如上,为什么查询不成功呢,我录制添加的操作也添加不成功。 |
|