Click or drag to resize
Tesco SW, a.s.

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
Syntax
C#
public string GetCssValue(
	string propertyName
)

Parameters

propertyName
Type: SystemString
The name of the CSS property to get the value of.

Return Value

Type: String
The value of the specified CSS property.

Implements

IWebElement.GetCssValue(String)
Exceptions
ExceptionCondition
StaleElementReferenceExceptionThrown when the target element is no longer valid in the document DOM.
Remarks
The 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