Class DownloadFileWithHttpRequest

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

@ParametersAreNonnullByDefault public class DownloadFileWithHttpRequest extends Object
  • 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(org.apache.hc.client5.http.protocol.RedirectStrategy redirectStrategy)
    • createTrustingHttpClient

      @CheckReturnValue @Nonnull 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

      @CheckReturnValue @Nonnull 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

      @CheckReturnValue @Nonnull 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