Partager via


UITestPropertyProvider.SetPropertyValue Method

When overridden in a derived class, sets the specified property of the given control with the provided value.

Namespace:  Microsoft.VisualStudio.TestTools.UITesting
Assemblies:   Microsoft.VisualStudio.TestTools.WindowsStore.UITesting (in Microsoft.VisualStudio.TestTools.WindowsStore.UITesting.dll)
  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)

Syntax

'Declaration
Public MustOverride Sub SetPropertyValue ( _
    uiTestControl As UITestControl, _
    propertyName As String, _
    value As Object _
)
public abstract void SetPropertyValue(
    UITestControl uiTestControl,
    string propertyName,
    Object value
)
public:
virtual void SetPropertyValue(
    UITestControl^ uiTestControl, 
    String^ propertyName, 
    Object^ value
) abstract
abstract SetPropertyValue : 
        uiTestControl:UITestControl * 
        propertyName:string * 
        value:Object -> unit
public abstract function SetPropertyValue(
    uiTestControl : UITestControl, 
    propertyName : String, 
    value : Object
)

Parameters

  • propertyName
    Type: String

    The name of the property.

  • value
    Type: Object

    The value for the property.

Exceptions

Exception Condition
NotSupportedException

This property provider does not support the specified property.

.NET Framework Security

See Also

Reference

UITestPropertyProvider Class

Microsoft.VisualStudio.TestTools.UITesting Namespace

UITestControl

Other Resources

Enable Coded UI Testing of Your Controls