51Testing软件测试论坛
标题:
急急急!录制一个下载另存为的操作,总是录制不成功,请高手帮助呀!
[打印本页]
作者:
qinet
时间:
2008-5-15 10:55
标题:
急急急!录制一个下载另存为的操作,总是录制不成功,请高手帮助呀!
#include "web_api.h"
现在要录制一个从网页中点击“下载”,然后系统弹出“另存为”窗口,将文件保存在本地并覆盖原文件的操作,现在录制完成后,运行脚本没有报错,但脚本中也没有记录下弹出窗口的操作,看本地硬盘中的文件也不是运行脚本所重新下载的文件。现在非常着急,怎样可以顺利录制到这个过程,并且在运行脚本后保存的文件可以被更新。在此先谢谢了。脚本如下:
Action()
{
lr_think_time( 11 );
lr_start_transaction("download");
web_concurrent_start(NULL);
web_url("button.gif_2",
"URL=http://172.16.24.79/cn/images/ctrl/button.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://172.16.24.79/cn/resources/index.php?class=zy",
LAST);
web_url("download.php",
"URL=http://172.16.24.79/cn/resources/download.php?id=443",
"Resource=1",
"RecContentType=application/force-download",
"Referer=",
LAST);
web_url("button.gif_3",
"URL=http://172.16.24.79/cn/images/ctrl/button.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://172.16.24.79/cn/resources/index.php?class=zy",
LAST);
web_concurrent_end(NULL);
lr_end_transaction("download", LR_AUTO);
return 0;
}
作者:
iori
时间:
2008-5-15 11:01
http://guanhe.cnblogs.com/archive/2006/06/27/436746.html
作者:
qinet
时间:
2008-5-15 11:20
谢谢楼上的网址,可其中的“点击下载完整的脚本文件”链接已经失效了。能不能在上传一份呀。。万分感谢。
作者:
qinet
时间:
2008-5-15 15:52
现在可以下载了。但下载到硬盘的文件为何为0K呢?
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2