Export (0) Print
Expand All
0 out of 2 rated this helpful - Rate this topic

UITestControl.GetProperty Method

Gets the value of the specified property.

Namespace:  Microsoft.VisualStudio.TestTools.UITesting
Assembly:  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)
public Object GetProperty(
	string propertyName
)

Parameters

propertyName
Type: System.String
The name of the property from which to retrieve a value.

Return Value

Type: System.Object
The value of the given property as Object. The Object must be cast to the appropriate data type.

To access the properties of a UITestControl (for example, to get the count of items in a ListBox or to set the text on a button) you must use GetProperty and SetProperty to get and set the specific properties of the UITestControl. The propertyName parameter specifies the property to access.

To get the count of items in a HtmlList, use GetProperty together with the parameter ItemCount.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.