Package com.codeborne.selenide.impl
Class DownloadFileWithHttpRequest
java.lang.Object
com.codeborne.selenide.impl.DownloadFileWithHttpRequest
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddHttpHeaders(Driver driver, org.apache.hc.client5.http.classic.methods.HttpGet httpGet, String credentials) protected voidconfigureHttpGet(org.apache.hc.client5.http.classic.methods.HttpGet httpGet, long timeout) protected org.apache.hc.client5.http.impl.classic.CloseableHttpClientprotected org.apache.hc.core5.http.protocol.HttpContextcreateHttpContext(Driver driver) protected org.apache.hc.client5.http.impl.classic.CloseableHttpClientconfigure 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 StringgetFileName(String fileToDownloadLocation, org.apache.hc.core5.http.HttpResponse response) protected voidsaveContentToFile(org.apache.hc.core5.http.HttpEntityContainer response, File downloadedFile)
-
Field Details
-
ignoreSelfSignedCerts
protected boolean ignoreSelfSignedCerts
-
-
Constructor Details
-
DownloadFileWithHttpRequest
public DownloadFileWithHttpRequest()
-
-
Method Details
-
download
@CheckReturnValue @Nonnull public File download(Driver driver, org.openqa.selenium.WebElement element, long timeout, FileFilter fileFilter) -
download
@CheckReturnValue @Nonnull public File download(Driver driver, URI url, long timeout, FileFilter fileFilter) -
download
@CheckReturnValue @Nonnull 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
@CheckReturnValue @Nonnull protected org.apache.hc.client5.http.impl.classic.CloseableHttpClient createDefaultHttpClient() -
createTrustingHttpClient
@CheckReturnValue @Nonnull protected org.apache.hc.client5.http.impl.classic.CloseableHttpClient createTrustingHttpClient() throws IOExceptionconfigure HttpClient to ignore self-signed certs as described here: ...- Throws:
IOException
-
createHttpContext
@CheckReturnValue @Nonnull protected org.apache.hc.core5.http.protocol.HttpContext createHttpContext(Driver driver) -
addHttpHeaders
-
getFileName
-
saveContentToFile
protected void saveContentToFile(org.apache.hc.core5.http.HttpEntityContainer response, File downloadedFile) throws IOException - Throws:
IOException
-