Bagikan melalui


KeyboardAction Class

Represents individual keyboard user actions.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.TestTools.UITest.Common.UITestAction
    Microsoft.VisualStudio.TestTools.UITest.Common.InputAction
      Microsoft.VisualStudio.TestTools.UITest.Common.KeyboardAction

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

Syntax

'Declaration
<SerializableAttribute> _
Public Class KeyboardAction _
    Inherits InputAction
[SerializableAttribute]
public class KeyboardAction : InputAction
[SerializableAttribute]
public ref class KeyboardAction : public InputAction
[<SerializableAttribute>]
type KeyboardAction =  
    class 
        inherit InputAction 
    end
public class KeyboardAction extends InputAction

The KeyboardAction type exposes the following members.

Constructors

  Name Description
Public method KeyboardAction() Initializes a new instance of the KeyboardAction class for XML serialization or deserialization.
Public method KeyboardAction(KeyActionType, Keys, String) Initializes a new instance of the KeyboardAction class by using the provided type of key event, the key that was pressed, and the value that was generated by that key.
Public method KeyboardAction(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.

Top

Properties

  Name Description
Public property ActionLogEntry Gets or sets the action log entry for the action. (Inherited from UITestAction.)
Public property ActionName Gets or sets the name of this action. (Overrides UITestAction.ActionName.)
Public property ActionType Gets or sets the type of keyboard operation.
Public property ActualThinkTime Gets or sets the think time after it processes other playback parameters that are provided by the UIActionInterpreter, such as the ThinkTimeMultiplier. (Inherited from UITestAction.)
Public property AdditionalInfo Gets additional information about this action. The information is usually used by an aggregator of test actions. The set procedure is not supported in this class. (Overrides UITestAction.AdditionalInfo.)
Public property Comment Gets or sets a comment for this action. (Inherited from UITestAction.)
Public property ContinueOnError Gets or sets a value that indicates whether to continue even if this action fails. (Inherited from UITestAction.)
Public property ContinueOnErrorWrapper Gets or sets the value of the ContinueOnError property as a string for serialization. (Inherited from UITestAction.)
Public property ElapsedTime Gets or sets the time span of the action. (Inherited from UITestAction.)
Public property EndTimestamp The timestamp for the end of the action. (Inherited from UITestAction.)
Public property Id Gets or sets a unique numeric identifier for this action. (Inherited from UITestAction.)
Public property IsGlobalHotkey Gets or sets a value that indicates whether the input is a global keyboard shortcut. (Inherited from InputAction.)
Public property IsParameterBound If this action can be parameterized, gets or sets a value that indicates whether the action is bound to a test parameter. (Inherited from UITestAction.)
Public property IsParameterizable Gets a value that indicates whether this action can be parameterized. (Inherited from UITestAction.)
Public property Key Gets or sets the key that was pressed.
Public property KeyValue Gets or sets the input value that was generated by the key press.
Public property ModifierKeys Gets or sets which modifier keys were pressed. (Inherited from InputAction.)
Public property NeedFiltering Gets or sets a value that indicates whether this action can be processed by a UITestActionFilter. (Inherited from UITestAction.)
Public property ParameterName Gets or sets the name of the corresponding parameter for the action value. (Inherited from UITestAction.)
Public property StartTimestamp Gets or sets the starting time stamp when executing this action. (Inherited from UITestAction.)
Public property Tags Gets a dictionary of additional information about this action that is needed during recording, aggregation, or post-processing. The set procedure is private. (Inherited from UITestAction.)
Public property ThinkTime Gets or sets the number of seconds that are required to execute this action. (Inherited from UITestAction.)
Public property ThinkTimeString Gets or sets the think time for this action by using a string value. (Inherited from UITestAction.)
Public property Timestamp Gets or sets the time stamp for this action. (Inherited from UITestAction.)
Public property UIElement Gets or sets the UI element on which this action operates. (Inherited from UITestAction.)
Public property UIObjectName Gets or sets the name of the UI element on which this action operates. (Inherited from UITestAction.)
Public property UITestActionExtension Sets or gets the an instance of UITestActionExtension which contains properties related to actions. (Inherited from UITestAction.)
Public property ValueAsString Gets or the input value as a string. The set procedure is not supported in this class. (Overrides UITestAction.ValueAsString.)

Top

Methods

  Name Description
Public method Equals Returns a value that indicates whether the given object is equal to this UI test action. (Inherited from UITestAction.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Overrides object.GetHashCode (Inherited from UITestAction.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Invoke Invokes this action. (Overrides UITestAction.Invoke(UITestActionInvoker, UIMap).)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method NotifyPropertyChanged Raises the PropertyChanged event. (Inherited from UITestAction.)
Public method ToString Returns the description of this action. (Inherited from UITestAction.)

Top

Events

  Name Description
Public event PropertyChanged Occurs when a property value changes. (Inherited from UITestAction.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.TestTools.UITest.Common Namespace

InputAction