Class DownloadOptions

java.lang.Object
com.codeborne.selenide.DownloadOptions
All Implemented Interfaces:
HasTimeout

@ParametersAreNonnullByDefault public class DownloadOptions extends Object implements HasTimeout
  • Method Details

    • getMethod

      @CheckReturnValue @Nonnull public FileDownloadMode getMethod()
    • timeout

      @CheckReturnValue public Duration timeout()
      Specified by:
      timeout in interface HasTimeout
    • getFilter

      @CheckReturnValue @Nonnull public FileFilter getFilter()
    • getAction

      @CheckReturnValue @Nonnull public DownloadAction getAction()
    • withTimeout

      @CheckReturnValue @Nonnull public DownloadOptions withTimeout(long timeoutMs)
    • withTimeout

      @CheckReturnValue @Nonnull public DownloadOptions withTimeout(Duration timeout)
    • withFilter

      @CheckReturnValue @Nonnull public DownloadOptions withFilter(FileFilter filter)
    • withAction

      public DownloadOptions withAction(DownloadAction action)
      User action to start the downloading process. By default, it's a click.

      Use this method if you need to close some alert before downloading file etc.

      Parameters:
      action - any lambda accepting a Driver and WebElement (the element being clicked).
      Returns:
      DownloadOptions
      Since:
      5.22.0
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • using

      @CheckReturnValue @Nonnull public static DownloadOptions using(FileDownloadMode method)