 | BaseElementGetCssValue Method |
Gets the value of a CSS property of this element.
Namespace:
TescoSW.MW.UITests.Common.PageModel.Components
Assembly:
TescoSW.MW.UITests.Common (in TescoSW.MW.UITests.Common.dll) Version: 15.2.7099.36746
Syntaxpublic string GetCssValue(
string propertyName
)
Parameters
- propertyName
- Type: SystemString
The name of the CSS property to get the value of.
Return Value
Type:
StringThe value of the specified CSS property.
Implements
IWebElement.GetCssValue(String)
ExceptionsException | Condition |
---|
StaleElementReferenceException | Thrown when the target element is no longer valid in the document DOM. |
RemarksThe value returned by the GetCssValue(String)
method is likely to be unpredictable in a cross-browser environment.
Color values should be returned as hex strings. For example, a
"background-color" property set as "green" in the HTML source, will
return "#008000" for its value.
See Also