简体   繁体   English

使用 selenium C#,如何在 IE11 中下载文件?

[英]Using selenium C#, How can I download Files in IE11?

I am trying to download files in IE11 for an automated test.我正在尝试在 IE11 中下载文件以进行自动化测试。 My scripts are written using selenium in C#.我的脚本是在 C# 中使用 selenium 编写的。 So, I have search a lot but all the answers that I see that might work are on java or directed to Firefox (which makes no sense).所以,我进行了很多搜索,但我看到的所有答案都适用于 Java 或针对 Firefox(这毫无意义)。

So I have tried to remove the save prompt from IE11 but I found not luck in that And I can't find and alternative to Robot for C#所以我试图从 IE11 中删除保存提示,但我发现这并不幸运而且我找不到 C# 机器人的替代品

I end up using System.Windows.Forms.SendKeys.SendWait("%S");我最终使用 System.Windows.Forms.SendKeys.SendWait("%S"); after the popup appears弹出窗口出现后

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM