Package com.codeborne.selenide.impl
Class DownloadFileWithHttpRequest
java.lang.Object
com.codeborne.selenide.impl.DownloadFileWithHttpRequest
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addHttpHeaders
(Driver driver, org.apache.hc.client5.http.classic.methods.HttpGet httpGet, String credentials) protected void
configureHttpGet
(org.apache.hc.client5.http.classic.methods.HttpGet httpGet, long timeout) protected org.apache.hc.client5.http.impl.classic.CloseableHttpClient
createDefaultHttpClient
(org.apache.hc.client5.http.protocol.RedirectStrategy redirectStrategy) protected org.apache.hc.core5.http.protocol.HttpContext
createHttpContext
(Driver driver) protected org.apache.hc.client5.http.impl.classic.CloseableHttpClient
createTrustingHttpClient
(org.apache.hc.client5.http.protocol.RedirectStrategy redirectStrategy) configure HttpClient to ignore self-signed certs as described here: ...download
(Driver driver, String relativeOrAbsoluteUrl, long timeout, FileFilter fileFilter) download
(Driver driver, URI url, long timeout, FileFilter fileFilter) download
(Driver driver, org.openqa.selenium.WebElement element, long timeout, FileFilter fileFilter) protected String
getFileName
(String fileToDownloadLocation, org.apache.hc.core5.http.HttpResponse response) protected void
saveContentToFile
(org.apache.hc.core5.http.HttpEntityContainer response, File downloadedFile)
-
Field Details
-
ignoreSelfSignedCerts
protected boolean ignoreSelfSignedCerts
-
-
Constructor Details
-
DownloadFileWithHttpRequest
public DownloadFileWithHttpRequest()
-
-
Method Details
-
download
public File download(Driver driver, org.openqa.selenium.WebElement element, long timeout, FileFilter fileFilter) -
download
-
download
public File download(Driver driver, String relativeOrAbsoluteUrl, long timeout, FileFilter fileFilter) -
configureHttpGet
protected void configureHttpGet(org.apache.hc.client5.http.classic.methods.HttpGet httpGet, long timeout) -
createDefaultHttpClient
protected org.apache.hc.client5.http.impl.classic.CloseableHttpClient createDefaultHttpClient(org.apache.hc.client5.http.protocol.RedirectStrategy redirectStrategy) -
createTrustingHttpClient
protected org.apache.hc.client5.http.impl.classic.CloseableHttpClient createTrustingHttpClient(org.apache.hc.client5.http.protocol.RedirectStrategy redirectStrategy) throws IOException configure HttpClient to ignore self-signed certs as described here: ...- Throws:
IOException
-
createHttpContext
-
addHttpHeaders
-
getFileName
-
saveContentToFile
protected void saveContentToFile(org.apache.hc.core5.http.HttpEntityContainer response, File downloadedFile) throws IOException - Throws:
IOException
-