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

BaseElementGetAttribute Method

Gets the value of the specified attribute for 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 GetAttribute(
	string attributeName
)

Parameters

attributeName
Type: SystemString
The name of the attribute.

Return Value

Type: String
The attribute's current value. Returns a if the value is not set.

Implements

IWebElement.GetAttribute(String)
Exceptions
ExceptionCondition
StaleElementReferenceExceptionThrown when the target element is no longer valid in the document DOM.
Remarks
The GetAttribute(String) method will return the current value of the attribute, even if the value has been modified after the page has been loaded. Note that the value of the following attributes will be returned even if there is no explicit attribute on the element:
Attribute nameValue returned if not explicitly specifiedValid element types
checkedcheckedCheck Box
selectedselectedOptions in Select elements
disableddisabledInput and other UI elements
See Also