![JAR search and dependency download from the Maven repository](/logo.png)
com.clarolab.selenium.pages.actions.WebElementHelpers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pages-framework Show documentation
Show all versions of pages-framework Show documentation
Framework for automated testing using Selenium. Provides easy configuration of WebDrivers with BrowserFactory. Provides a Page abstraction.
The newest version!
package com.clarolab.selenium.pages.actions;
import com.google.common.collect.Lists;
import org.openqa.selenium.WebElement;
import java.util.List;
public class WebElementHelpers {
public static boolean webElementHasClass(WebElement webElement, String className) {
return getClasses(webElement).contains(className);
}
public static List getClasses(WebElement webElement) {
if (webElement.getAttribute("class") == null) {
return Lists.newArrayList();
}
return Lists.newArrayList(webElement.getAttribute("class").split("\\s+"));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy