|
好象LR不能录制弹出窗口的操作;
之前碰到过弹出窗口保存的操作,没有录制到。
好象只能使用其他函数来解决,相关方法请搜索论坛。
类似下面的方法:
web_reg_save_param("FILED","LB=","RB=","Search=body",LAST);
//your web url that download file
// get the download file's size.
flen = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
if(flen > 0)
{
//create a new file. If you run the script in controller, you can use unique //name in Case 2 to generate a unique file.
if((filedes = fopen("c:\\test.doc", "wb")) == NULL)
{
lr_output_message("Open File Failed!");
// lr_end_transaction("file_download", LR_FAIL);
}
//write the data which are got from server to the file created in your
// location.
i = fwrite(lr_eval_string("{FILED}"), flen, 1, filedes);
lr_output_message("Successfully wrote %d", i );
// lr_end_transaction("file_download", LR_AUTO);
fclose(filedes);
} |
|