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

aquality.selenium.elements.ElementStateProvider Maven / Gradle / Ivy

There is a newer version: 4.9.0
Show newest version
package aquality.selenium.elements;

import aquality.selenium.core.elements.DefaultElementStateProvider;
import aquality.selenium.core.elements.interfaces.IElementFinder;
import aquality.selenium.core.logging.ILogElementState;
import aquality.selenium.core.waitings.IConditionalWait;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

public class ElementStateProvider extends DefaultElementStateProvider {

    public ElementStateProvider(By locator, IConditionalWait conditionalWait, IElementFinder elementFinder,
                                ILogElementState logger) {
        super(locator, conditionalWait, elementFinder, logger);
    }

    @Override
    protected boolean isElementEnabled(WebElement element) {
        return element.isEnabled() && !element.getAttribute(Attributes.CLASS.toString()).contains("disabled");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy