// Path: src/main/java/io/qameta/htmlelements/matcher/PredicateMatcher.java
// public class PredicateMatcher<T> extends TypeSafeMatcher<T> {
// 
//     private final Predicate<T> predicate;
// 
//     public PredicateMatcher(Predicate<T> predicate) {
//         this.predicate = predicate;
//     }
// 
//     @Override
//     protected boolean matchesSafely(T t) {
//         return predicate.test(t);
//     }
// 
//     @Override
//     public void describeTo(Description description) {
// 
//     }
// 
// }


import io.qameta.htmlelements.extension.HoverMethod;
import io.qameta.htmlelements.extension.ShouldMethod;
import io.qameta.htmlelements.extension.Timeout;
import io.qameta.htmlelements.extension.ToStringMethod;
import io.qameta.htmlelements.extension.WaitUntilMethod;
import io.qameta.htmlelements.matcher.PredicateMatcher;
import org.hamcrest.Matcher;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.internal.Locatable;
import java.util.function.Predicate;
package io.qameta.htmlelements.element;



public interface ExtendedWebElement<FluentType> extends WebElement, Locatable {

    @HoverMethod
    FluentType hover();

    @WaitUntilMethod
    FluentType waitUntil(String message, Matcher matcher);

    @WaitUntilMethod
    FluentType waitUntil(String message, Matcher matcher, @Timeout long timeout);

    default FluentType waitUntil(Matcher matcher) {
        return waitUntil("", matcher);
    }

    default FluentType waitUntil(Predicate<FluentType> predicate) {
        return waitUntil("", predicate);
    }

    default FluentType waitUntil(String description, Predicate<FluentType> predicate) {
// Path: src/main/java/io/qameta/htmlelements/matcher/PredicateMatcher.java
// public class PredicateMatcher<T> extends TypeSafeMatcher<T> {
// 
//     private final Predicate<T> predicate;
// 
//     public PredicateMatcher(Predicate<T> predicate) {
//         this.predicate = predicate;
//     }
// 
//     @Override
//     protected boolean matchesSafely(T t) {
//         return predicate.test(t);
//     }
// 
//     @Override
//     public void describeTo(Description description) {
// 
//     }
// 
// }


// Path: src/main/java/io/qameta/htmlelements/element/ExtendedWebElement.java
import io.qameta.htmlelements.extension.HoverMethod;
import io.qameta.htmlelements.extension.ShouldMethod;
import io.qameta.htmlelements.extension.Timeout;
import io.qameta.htmlelements.extension.ToStringMethod;
import io.qameta.htmlelements.extension.WaitUntilMethod;
import io.qameta.htmlelements.matcher.PredicateMatcher;
import org.hamcrest.Matcher;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.internal.Locatable;
import java.util.function.Predicate;

package io.qameta.htmlelements.element;



public interface ExtendedWebElement<FluentType> extends WebElement, Locatable {

    @HoverMethod
    FluentType hover();

    @WaitUntilMethod
    FluentType waitUntil(String message, Matcher matcher);

    @WaitUntilMethod
    FluentType waitUntil(String message, Matcher matcher, @Timeout long timeout);

    default FluentType waitUntil(Matcher matcher) {
        return waitUntil("", matcher);
    }

    default FluentType waitUntil(Predicate<FluentType> predicate) {
        return waitUntil("", predicate);
    }

    default FluentType waitUntil(String description, Predicate<FluentType> predicate) {
        return waitUntil(description, new PredicateMatcher<>(predicate));