Class ClickOptions

All Implemented Interfaces:

@ParametersAreNonnullByDefault public class ClickOptions extends Object implements HasTimeout
  • Constructor Details

    • ClickOptions

      protected ClickOptions(ClickMethod clickMethod, int offsetX, int offsetY, @Nullable Duration timeout)
  • Method Details

    • usingDefaultMethod

      @CheckReturnValue @Nonnull public static ClickOptions usingDefaultMethod()
    • usingJavaScript

      @CheckReturnValue @Nonnull public static ClickOptions usingJavaScript()
    • withOffset

      @CheckReturnValue @Nonnull public static ClickOptions withOffset(int offsetX, int offsetY)
    • withTimeout

      @CheckReturnValue @Nonnull public static ClickOptions withTimeout(Duration timeout)
    • offsetX

      @CheckReturnValue public int offsetX()
    • offsetY

      @CheckReturnValue public int offsetY()
    • clickMethod

      @CheckReturnValue @Nonnull public ClickMethod clickMethod()
    • timeout

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

      @CheckReturnValue @Nonnull public ClickOptions offsetX(int offsetX)
    • offsetY

      @CheckReturnValue @Nonnull public ClickOptions offsetY(int offsetY)
    • offset

      @CheckReturnValue @Nonnull public ClickOptions offset(int offsetX, int offsetY)
    • timeout

      @CheckReturnValue @Nonnull public ClickOptions timeout(Duration timeout)

      Custom timeout for this click.

      It's only reasonable to set this timeout if it's different from `Configuration.pageLoadTimeout` which is by default 30 seconds. Most probably it's needed to a set a custom timeout when you need to click a link which opens a very-very slow page which loads in more than 30 seconds.

      NB! We strongly recommend to optimize such slow pages instead of increasing timeout. These pages make your tests slower.

    • toString

      public String toString()
      toString in class Object