aquality.selenium.elements.ElementStateProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aquality-selenium Show documentation
Show all versions of aquality-selenium Show documentation
Library around Selenium WebDriver
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