Partager via


KeyboardAction Constructor (UITechnologyElement, KeyActionType, Keys, String)

Initializes a new instance of the KeyboardAction class by using the provided element, type of key event, the key that was pressed, and the value that was generated by that key.

Namespace:  Microsoft.VisualStudio.TestTools.UITest.Common
Assembly:  Microsoft.VisualStudio.TestTools.UITest.Common (in Microsoft.VisualStudio.TestTools.UITest.Common.dll)

Syntax

'Declaration
Public Sub New ( _
    uiElement As UITechnologyElement, _
    actionType As KeyActionType, _
    key As Keys, _
    keyValue As String _
)
public KeyboardAction(
    UITechnologyElement uiElement,
    KeyActionType actionType,
    Keys key,
    string keyValue
)
public:
KeyboardAction(
    UITechnologyElement^ uiElement, 
    KeyActionType actionType, 
    Keys key, 
    String^ keyValue
)
new : 
        uiElement:UITechnologyElement * 
        actionType:KeyActionType * 
        key:Keys * 
        keyValue:string -> KeyboardAction
public function KeyboardAction(
    uiElement : UITechnologyElement, 
    actionType : KeyActionType, 
    key : Keys, 
    keyValue : String
)

Parameters

  • key
    Type: Keys

    A member of the Keys enumeration.

  • keyValue
    Type: String

    The value that was generated by the key press.

.NET Framework Security

See Also

Reference

KeyboardAction Class

KeyboardAction Overload

Microsoft.VisualStudio.TestTools.UITest.Common Namespace

UITechnologyElement

KeyActionType

Keys