
com.codeborne.selenide.FluentCommand 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 com.codeborne.selenide.impl.WebElementSource;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import org.jspecify.annotations.Nullable;
/**
* Almost the same as {@link Command}, but returns {@link SelenideElement} (non-nullable!).
* Convenient to write fluent apis (that may be chained):
*
*
* {@code $("button")
* .execute(highlight()) // custom command
* .execute(pressEscape()) // another custom command
* .click();
* }
*
*/
public abstract class FluentCommand implements Command {
/**
* @deprecated It's easier to override method {@link #execute(WebElementSource, Object[])} instead.
*/
@Override
@CanIgnoreReturnValue
@Deprecated
public SelenideElement execute(SelenideElement proxy, WebElementSource locator, Object @Nullable [] args) {
execute(locator, args);
return proxy;
}
protected abstract void execute(WebElementSource locator, Object @Nullable [] args);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy