Selenide PDF 下载无法下载文件:代理服务器未启动

Selenide PDF Download Cannot download file: proxy server is not started

我在尝试下载 pdf 文件时遇到代理错误,无法理解这个问题。我在公司防火墙后面,如您所见,我已尝试设置代理,但仍然出现此错误:

java.lang.IllegalStateException: Cannot download file: proxy server is not started

我该如何解决这个问题,这到底是什么意思? Google 搜索没有为我提供太多有价值的信息,或者我无法正确理解,非常感谢提示。

我尝试了什么:

Configuration.proxyEnabled = true;
Configuration.fileDownload = FileDownloadMode.PROXY;
Configuration.proxyHost = "32.453.324.435";
Configuration.proxyPort = 8080;
File file = $(applicationList.printButton).download();

还有这个:

String url = "http://32.453.324.435/";
System.setProperty("wdm.proxy", url);    // url as "http://host:port"
System.setProperty("wdm.proxyUser", url);
System.setProperty("wdm.proxyPass", url);

我设法通过在 @BeforeAll 设置方法中设置配置属性找到了解决方案,似乎设置 downloadsFolder 有所帮助

Configuration.downloadsFolder = "/src/pdfs";
Configuration.proxyHost = "32.453.324.435";
Configuration.proxyPort = 8080;
Configuration.proxyEnabled = true;
Configuration.fileDownload = FileDownloadMode.PROXY;