关于怎么在LR中模拟下载的动作
来源:互联网 发布:stc单片机iap存储数据 编辑:程序博客网 时间:2024/05/05 15:55
Action()
{
long i,fp;
web_add_cookie("sid=26CE7C; DOMAIN=www.51testing.com");
web_add_cookie("_cookietime=31536000; DOMAIN=www.51testing.com");
web_add_cookie("_discuz_uid=2327; DOMAIN=www.51testing.com");
web_add_cookie("_discuz_pw=6cd9c1d7e2498582eddcf7a91a936c06; DOMAIN=www.51testing.com");
web_add_cookie("_discuz_secques=6ccf9bcd; DOMAIN=www.51testing.com");
web_add_cookie("oldtopics=%096342%09; DOMAIN=www.51testing.com");
web_url("www.51testing.com",
"URL=http://www.51testing.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
LAST);
web_url("opsdirective.xml",
"URL=http://toolbar.msn.com/static/msntbs15/opsdirective.xml?type=2",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t5.inf",
"Mode=HTML",
LAST);
web_url("index.htm",
"URL=http://www.51testing.com/index/index.htm",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t6.inf",
"Mode=HTML",
EXTRARES,
"Url=lib/flash/logo.swf", "Referer=", ENDITEM,
"Url=lib/flash/title.swf", "Referer=", ENDITEM,
"Url=../common/lib/liuchengxx1.swf", "Referer=", ENDITEM,
LAST);
web_link("51Testing软件测试论坛",
"Text=51Testing软件测试论坛",
"Snapshot=t7.inf",
EXTRARES,
"Url=images/default/bg.gif", ENDITEM,
"Url=flash/title.swf", "Referer=", ENDITEM,
"Url=images/default/headerbg.gif", ENDITEM,
"Url=images/default/catbg.gif", ENDITEM,
LAST);
lr_think_time( 3 );
web_link("[LoadRunner]",
"Text=[LoadRunner]",
"Snapshot=t8.inf",
EXTRARES,
"Url=images/default/bg.gif", "Referer=http://www.51testing.com/cgi-bin/forumdisplay.php?fid=67", ENDITEM,
"Url=flash/title.swf", "Referer=", ENDITEM,
"Url=images/default/headerbg.gif", "Referer=http://www.51testing.com/cgi-bin/forumdisplay.php?fid=67", ENDITEM,
LAST);
lr_think_time( 1 );
web_link("我编写了一个小脚本,其中讲叙了怎样做关联,怎样写custom request供大家参考",
"Text=我编写了一个小脚本,其中讲叙了怎样做关联,怎样写custom request供大家参考",
"Snapshot=t9.inf",
EXTRARES,
"Url=images/default/bg.gif", "Referer=http://www.51testing.com/cgi-bin/viewthread.php?tid=13860&fpage=1", ENDITEM,
"Url=flash/title.swf", "Referer=", ENDITEM,
"Url=images/default/headerbg.gif", "Referer=http://www.51testing.com/cgi-bin/viewthread.php?tid=13860&fpage=1", ENDITEM,
LAST);
lr_start_transaction("DownLoad");
fp = fopen("c:\\flight.rar","wb");
web_set_max_html_param_len("500000");
web_reg_save_param("FILED","LB=","RB=","Search=Body",LAST);
web_link("flight_script13.rar",
"Text=flight_script13.rar",
"Snapshot=t10.inf",
LAST);
i = web_get_int_property( HTTP_INFO_DOWNLOAD_SIZE );
if (i>0)
{
fwrite(lr_eval_string("{FILED}"),i,1,fp);
}
lr_think_time( 4 );
fclose(fp);
lr_end_transaction("DownLoad", LR_AUTO);
return 0;
}
- 关于怎么在LR中模拟下载的动作
- 在LR中怎么模拟下载动作?
- 怎么在PPT2010中添加动作按钮
- android studio 中怎么在模拟机上下载音乐(如何把音乐放到android studio的模拟器中)
- 关于lr调用jar在vuser中可以运行,但是controller中却报错的问题
- 关于LR的总结
- Direct3D中模拟机械手动作
- 关于在。NET中怎么使用事务的问题
- 关于怎么在winform中屏蔽复制,粘贴,剪切的.
- 怎么实现在MindMapper中关于文件链接的添加
- LR 脚本在init中参数化的问题
- 在 LR 中如何解决Socket 接收数据的验证
- 在lr中设置运行脚本的指定时间
- 在LR中如何忽略Socket接收数据的验证
- LR 脚本在init中参数化的问题
- LR模拟请求中出现中文字符串导致错误的解决办法_lr_convert_string_encoding
- 关于JSP中标准动作<jsp:useBean>的报错
- lr录制文件下载的脚本
- Android 菜单(OptionMenu)大全 建立你自己的菜单
- U大师U盘装系统——安装ghostXP系统教程(V1.1.0版)
- jQuery的Select操作集合
- linux中fork()函数详解
- sharepoint 2010 自定义字段开发(1) 创建一个简单的列表自定义字段
- 关于怎么在LR中模拟下载的动作
- 任正非:一江春水向东流 (zz)
- php变量作用域
- LinuxC/C++编程基础(30) 视频包缓存的实现
- cdev结构 and MKDEV
- Java数据类型和MySql数据类型对应表
- 守护进程与setid()
- C# list变成字符串
- ffmpeg 中av_rescale_rnd 的含义