简体   繁体   English

如何使用C#.NET自动执行-下载文件并将其保存在Internet Explorer浏览器中?

[英]How to automate - download a file and save it in internet explorer browser using C# .NET?

I am able to download the file which I want to target, but the problem is IE is asking option to open or save it, instead of directly saving it to the folder. 我可以下载要定位的文件,但问题是IE要求选择打开或保存文件,而不是直接将其保存到文件夹。 I want the file(.xls) which I downloaded to be saved in any specific folder. 我希望将我下载的文件(.xls)保存在任何特定的文件夹中。

为什么不使用WebClient.DownloadFile?

@h.munawar - and what the next? @ h.munawar-接下来呢? WebClient.DownloadFile will download file from source to the server, not client machine! WebClient.DownloadFile会将文件从源文件下载到服务器,而不是客户端计算机!

Here is as I'm understand goal is to download file to the client's machine 据我了解,这是将文件下载到客户端计算机的目标

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用C#中的AutoIT库在具有硒驱动程序的Internet Explorer中下载文件? - How to Download file in Internet Explorer with selenium driver using AutoIT library in C#? 通过c#按下Internet Explorer的“文件下载对话框”的保存按钮 - Press save button of “File download dialog” of internet explorer via c# HTTP响应文件下载在Internet Explorer和Chrome(C#,Asp.net)中不起作用 - Http response file download not working in Internet explorer and chrome (C#, Asp.net) 使用C#将Internet Explorer浏览器嵌入Winforms - Embed Internet Explorer browser into Winforms using C# Watin C#:如何隐藏“ Internet Explorer不是您的默认浏览器” - Watin C# : How to hide “Internet Explorer is not your default browser” C#中Internet Explorer的下载管理器 - Download Manager for Internet Explorer in C# 使用.ajaxForm和C#MVC,如何防止Internet Explorer尝试保存Json结果? - Using .ajaxForm and C# MVC, how can I prevent Internet Explorer from trying to save Json result? 使用C#在IE 11中自动下载文件 - Automate of file download in IE 11 using c# 如何使用Selenium Webdriver在Internet Explorer上获取Cookie-C# - How to get cookies on internet explorer using Selenium webdriver - C# 如何使用C#在Internet Explorer中更改主页? - How to change home page in Internet Explorer using C#?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM