com.codeborne.selenide.DragAndDropOptions 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;
import static com.codeborne.selenide.DragAndDropOptions.DragAndDropMethod.ACTIONS;
import static com.codeborne.selenide.DragAndDropOptions.DragAndDropMethod.JS;
@ParametersAreNonnullByDefault
public class DragAndDropOptions {
private final DragAndDropMethod method;
public DragAndDropOptions(DragAndDropMethod method) {
this.method = method;
}
@CheckReturnValue
@Nonnull
public static DragAndDropOptions usingJavaScript() {
return new DragAndDropOptions(JS);
}
@CheckReturnValue
@Nonnull
public static DragAndDropOptions usingActions() {
return new DragAndDropOptions(ACTIONS);
}
@CheckReturnValue
@Nonnull
public DragAndDropMethod getMethod() {
return method;
}
public enum DragAndDropMethod {
/**
* Executing drag and drop via Selenium Actions
*/
ACTIONS,
/**
* Executing drag and drop via JS script
*/
JS
}
@Override
public String toString() {
return String.format("method: %s", method);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy