How to check if dom has a class using WebDriver (Selenium 2)?
To expand on Sam Woods' answer, I use a simple extension method (this is for C#) to test whether or not an element has a specified class:
public static bool HasClass( this IWebElement el, string className ) { return el.GetAttribute( "class" ).Split( ' ' ).Contains( className );}