All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codeborne.selenide.FluentCommand Maven / Gradle / Ivy

There is a newer version: 7.7.3
Show newest version
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