Class ClickOptions

java.lang.Object
com.codeborne.selenide.ClickOptions
All Implemented Interfaces:
HasTimeout
Direct Known Subclasses:
AppiumClickOptions

public class ClickOptions extends Object implements HasTimeout
  • Constructor Details

    • ClickOptions

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

    • usingDefaultMethod

      public static ClickOptions usingDefaultMethod()
    • usingJavaScript

      public static ClickOptions usingJavaScript()
    • withOffset

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

      public static ClickOptions withTimeout(Duration timeout)
    • offsetX

      public int offsetX()
    • offsetY

      public int offsetY()
    • clickMethod

      public ClickMethod clickMethod()
    • timeout

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

      public boolean isForce()
    • offsetX

      public ClickOptions offsetX(int offsetX)
    • offsetY

      public ClickOptions offsetY(int offsetY)
    • offset

      public ClickOptions offset(int offsetX, int offsetY)
    • timeout

      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.

    • force

      public ClickOptions force()
    • toString

      public String toString()
      Overrides:
      toString in class Object