HtmlControlGetValueT Method (String, T)

Progress Software Corporation - Testing Framework 2018.1 Automation Infrastructure
Get a property value (e.g. control.border or control.style.backgroundColor) and return the specified default value if the get fails for any reason.

Namespace:  ArtOfTest.WebAii.Controls.HtmlControls
Assembly:  ArtOfTest.WebAii (in ArtOfTest.WebAii.dll) Version: 2018.1.116.0 (2018.1.116.0)
Syntax

public virtual T GetValue<T>(
	string propertyName,
	T defaultValue
)

Parameters

propertyName
Type: SystemString
The property name.
defaultValue
Type: T
A default value to use in case the conversion failed to the specified type and you want to return a custom default value other than default(T).

Type Parameters

T
The type of the property.

Return Value

Type: T
The value of the property or defaultValue if the property value cannot be retrieved or converted.
Remarks

The property is retrieved by executing Javascript on the client side using the specified property name as the Javascript function.
Examples

string s = myControl.GetValue<string>("style.backgroundColor", "White")
See Also

Reference