com.codeborne.selenide.HoverOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenide-core Show documentation
Show all versions of selenide-core Show documentation
Selenide = concise API for Selenium WebDriver
package com.codeborne.selenide;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
@ParametersAreNonnullByDefault
public class HoverOptions {
private final int offsetX;
private final int offsetY;
private HoverOptions(int offsetX, int offsetY) {
this.offsetX = offsetX;
this.offsetY = offsetY;
}
@CheckReturnValue
@Nonnull
public static HoverOptions withOffset(int offsetX, int offsetY) {
return new HoverOptions(offsetX, offsetY);
}
@CheckReturnValue
public int offsetX() {
return offsetX;
}
@CheckReturnValue
public int offsetY() {
return offsetY;
}
@Override
public String toString() {
if (offsetX == 0 && offsetY == 0)
return "";
else
return String.format("offsetX: %s, offsetY: %s", offsetX, offsetY);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy