diff --git a/src/Legerity.Web/Extensions/IWebElementExtensions.cs b/src/Legerity.Web/Extensions/IWebElementExtensions.cs
index 1f424dc8..3cc907f1 100644
--- a/src/Legerity.Web/Extensions/IWebElementExtensions.cs
+++ b/src/Legerity.Web/Extensions/IWebElementExtensions.cs
@@ -16,5 +16,16 @@ public static string GetInnerHtml(this IWebElement element)
{
return element.GetAttribute("innerHTML");
}
+
+ ///
+ /// Determines whether the specified has the specified class.
+ ///
+ /// The to check.
+ /// The name of the class the element should have.
+ /// True if the element has the class; otherwise, false.
+ public static bool HasClass(this IWebElement element, string className)
+ {
+ return element.GetAttribute("class").Contains(className);
+ }
}
}