java - 如何使用 IE (Internet Explorer 11) 更改默认下载目录

标签 java selenium selenium-webdriver selenium-grid

在这篇文章中,我看到了为 Chrome 和 Firefox 设置下载目录的解决方案 how to change file download location in Webdriver while using chrome driver/firefox driver

这些对我来说非常有效(即公认的答案),但是四处搜索我找不到任何关于使用 Internet Explorer 11 执行此操作的信息。有谁知道我在哪里可以找到这些信息?

最佳答案

根据 this answer来自 Jim Evans,他积极参与 Internet Explorer 的 WebDriver,这是不可能的:

Internet Explorer doesn't use profiles. It's a limitation of the browser itself, not the IE driver. As such, there is no way to automatically download files to a specified location with Internet Explorer.

还有:

As far as I am aware, there is no difference between Microsoft Edge and Internet Explorer with respect to using "profiles." The profile is still tied to the logged-in user account in Windows.

因此,从某种意义上说,目录已经指定。关键是您不能通过 WebDriver 覆盖它。

关于java - 如何使用 IE (Internet Explorer 11) 更改默认下载目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36241157/

相关文章:

java - org.apache.tomcat.SimpleInstanceManager 无法转换为 org.apache.tomcat.InstanceManager

java - Apache HttpClient - 使用 SSL 或 TLSv1.2 时忽略 keepalive

java - Spring Boot 异常处理程序不捕获异常

java - Tomcat - 监听两个端口以进行测试

python - Spotify 网络播放器 : Select Element 'Play' Button w/Selenium

java - 如何将字符串转换为按类型

python - 如何使用 Selenium (python)忽略一个元素?

java - 如何指定statsd客户端端口?

java - 无法将 WebDriver 对象传递给 TestNG 中的工厂方法

code-coverage - 哪些工具可用于使用浏览器自动化测试计算代码覆盖率