Export (0) Print
Expand All

Keyboard Class

Provides static methods for performing automated keyboard actions.

System::Object
  Microsoft.VisualStudio.TestTools.UITesting::Keyboard

Namespace:  Microsoft.VisualStudio.TestTools.UITesting
Assembly:  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)

public ref class Keyboard : IDisposable

The Keyboard type exposes the following members.

  NameDescription
Protected methodKeyboardInfrastructure. Initializes a new instance of the Keyboard class.
Top

  NameDescription
Public propertyStatic memberInstanceGets or sets the keyboard instance.
Public propertyStatic memberSendKeysDelayGets or sets the time to wait between sending keystrokes to the application.
Top

  NameDescription
Public methodDispose()Releases all resources that are used by the current instance of the Keyboard class.
Protected methodDispose(Boolean)Releases the unmanaged resources that are used by the Keyboard and optionally releases the managed resources.
Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeReleases unmanaged resources and performs other cleanup operations before this Keyboard instance is reclaimed by garbage collection. (Overrides Object::Finalize().)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberPressModifierKeys(ModifierKeys)Presses the specified modifier keys without releasing them.
Public methodStatic memberPressModifierKeys(UITestControl, ModifierKeys)Presses the specified modifier keys in the given control without releasing them.
Protected methodPressModifierKeysImplementationPresses the specified modifier keys without releasing them.
Public methodStatic memberReleaseModifierKeys(ModifierKeys)Releases the specified keys that were previously pressed by using the PressModifierKeys method.
Public methodStatic memberReleaseModifierKeys(UITestControl, ModifierKeys)Releases the specified keys that were previously pressed by using the PressModifierKeys method in the given control.
Protected methodReleaseModifierKeysImplementationInfrastructure. Presses the specified modifier keys in the given control without releasing them.
Public methodStatic memberSendKeys(String)Sends keystrokes to generate the specified text string.
Public methodStatic memberSendKeys(String, Boolean)Sends keystrokes to generate the specified text string.
Public methodStatic memberSendKeys(String, ModifierKeys)Sends keystrokes to generate the specified text string.
Public methodStatic memberSendKeys(UITestControl, String)Sends keystrokes to generate the specified text string.
Public methodStatic memberSendKeys(String, ModifierKeys, Boolean)Sends keystrokes to generate the specified text string.
Public methodStatic memberSendKeys(UITestControl, String, Boolean)Sends keystrokes to generate the specified text string.
Public methodStatic memberSendKeys(UITestControl, String, ModifierKeys)Sends keystrokes to the provided control to generate the specified text string by using the provided modifier keys.
Public methodStatic memberSendKeys(String, ModifierKeys, Boolean, Boolean)Sends keystrokes to the provided control to generate the specified text string using the provided modifier keys and indicators for encoding and unicode.
Public methodStatic memberSendKeys(UITestControl, String, ModifierKeys, Boolean)Sends keystrokes to the provided control to generate the specified text string using the provided modifier keys and encoding indicator.
Public methodStatic memberSendKeys(UITestControl, String, ModifierKeys, Boolean, Boolean)Sends keystrokes to the provided control to generate the specified text string by using the provided modifier keys and indicators for encoding and unicode.
Protected methodSendKeysImplementation
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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

Community Additions

ADD
Show:
© 2014 Microsoft