Class DownloadFileWithHttpRequest

java.lang.Object
com.codeborne.selenide.impl.DownloadFileWithHttpRequest

public class DownloadFileWithHttpRequest extends Object
  • 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

      public File download(Driver driver, URI url, long timeout, FileFilter fileFilter)
    • 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

      protected org.apache.hc.core5.http.protocol.HttpContext createHttpContext(Driver driver)
    • addHttpHeaders

      protected void addHttpHeaders(Driver driver, org.apache.hc.client5.http.classic.methods.HttpGet httpGet, String credentials)
    • getFileName

      protected String getFileName(String fileToDownloadLocation, org.apache.hc.core5.http.HttpResponse response)
    • saveContentToFile

      protected void saveContentToFile(org.apache.hc.core5.http.HttpEntityContainer response, File downloadedFile) throws IOException
      Throws:
      IOException