How can I check if a selenium web element contains a specific css class.
I have this html li element
Based on a common pre-classList javascript technique:
classList
public boolean hasClass(WebElement element, String theClass) { return (" " + element.getAttribute("class") + " ").contains(" " + theClass + " "); }