Method HasClass
HasClass(string, string)
Checks whether a DOM element has a specific CSS class.
Declaration
Task<bool> HasClass(string selectorOrElement, string className)
Parameters
Type | Name | Description |
---|---|---|
string | selectorOrElement | A CSS selector or ElementReference representing the element. |
string | className | The class name to check for. |
Returns
Type | Description |
---|---|
Task<bool> | A task that resolves to |
HasClass(ElementReference, string)
Checks whether a DOM element has a specific CSS class.
Declaration
Task<bool> HasClass(ElementReference elementRef, string className)
Parameters
Type | Name | Description |
---|---|---|
ElementReference | elementRef | A reference to the HTML element. |
string | className | The class name to check for. |
Returns
Type | Description |
---|---|
Task<bool> | A task that resolves to |