Method | Description | |
---|---|---|
GetAsyncKeyState ( Key key ) : bool |
Checks whether the specified key is currently up or down
|
|
MoveTo ( |
Move the mouse to an element.
|
|
MoveTo ( Point pt ) : void |
Move the mouse to a point. pt are in pixels that are relative to desktop origin. |
|
MoveToAndClick ( |
Move the mouse to an element and click on it. The primary mouse button will be used this is usually the left button except if the mouse buttons are swaped.
|
|
MoveToAndClick ( Point pt ) : void |
Move the mouse to a point and click. The primary mouse button will be used this is usually the left button except if the mouse buttons are swaped. pt are in pixels that are relative to desktop origin. |
|
SendKeyboardInput ( Key key, bool press ) : void |
Inject keyboard input into the system
|
|
SendMouseInput ( double x, double y, int data, SendMouseInputFlags flags ) : void |
Inject pointer input into the system x, y are in pixels. If Absolute flag used, are relative to desktop origin. |
|
SendUnicodeKeyboardInput ( char key, bool press ) : void |
Injects a unicode character as keyboard input into the system
|
|
SendUnicodeString ( string data ) : void |
Injects a string of Unicode characters using simulated keyboard input It should be noted that this overload just sends the whole string with no pauses, depending on the recieving applications input processing it may not be able to keep up with the speed, resulting in corruption or loss of the input data.
|
|
SendUnicodeString ( string data, int sleepFrequency, int sleepLength ) : void |
Injects a string of Unicode characters using simulated keyboard input with user defined timing.
|
|
SetValue ( |
This is a hyrbird of the ValuePattern.SetValue code extracted from the UI Automation sources NOTE: Requires the ability to set focus to the current automation element
|
Method | Description | |
---|---|---|
GetWindowHandleFromAutomationElement ( |
Gets WindowHandle from an AutomationElement
|
|
Input ( ) : System.Globalization | ||
InternalSendUnicodeString ( string data, int sleepFrequency, int sleepLength ) : void | ||
IsBitSet ( int flags, int bit ) : bool |
Is bit set?
|
|
IsExtendedKey ( Key key ) : bool | ||
SendKeyboardInput ( Key key ) : void |
Helper: Sends the up and down keyboard input
|
|
SendKeyboardInput ( Key key, int millisecondDelay ) : void |
Helper: Sends the up and down keyboard input
|
|
SendKeyboardInput ( string keyCombination ) : void |
Does a look up of the string in keyCombination, converts the string to a Keys enum, and then sends the results to SendKeyboardInput().
|
|
SendKeyboardInput ( string keyCombination, int millisecondDelay ) : void |
Does a look up of the string in keyCombination, converts the string to a Keys enum, and then sends the results to SendKeyboardInput().
|
|
SendKeyboardInputVK ( byte vk, bool press ) : void |
public static GetAsyncKeyState ( Key key ) : bool | ||
key | Key | The Key to check |
return | bool |
public static MoveTo ( |
||
el | The element that the mouse will move to | |
return | void |
public static MoveTo ( Point pt ) : void | ||
pt | Point | The point that the mouse will move to. |
return | void |
public static MoveToAndClick ( |
||
el | The element to click on | |
return | void |
public static MoveToAndClick ( Point pt ) : void | ||
pt | Point | The point to click at |
return | void |
public static SendKeyboardInput ( Key key, bool press ) : void | ||
key | Key | indicates the key pressed or released. Can be one of the constants defined in the Key enum |
press | bool | true to inject a key press, false to inject a key release |
return | void |
public static SendMouseInput ( double x, double y, int data, SendMouseInputFlags flags ) : void | ||
x | double | x coordinate of pointer, if Move flag specified |
y | double | y coordinate of pointer, if Move flag specified |
data | int | wheel movement, or mouse X button, depending on flags |
flags | SendMouseInputFlags | flags to indicate which type of input occurred - move, button press/release, wheel move, etc. |
return | void |
public static SendUnicodeKeyboardInput ( char key, bool press ) : void | ||
key | char | indicates the key to be pressed or released. Can be any unicode character |
press | bool | true to inject a key press, false to inject a key release |
return | void |
public static SendUnicodeString ( string data ) : void | ||
data | string | The unicode string to be sent |
return | void |
public static SendUnicodeString ( string data, int sleepFrequency, int sleepLength ) : void | ||
data | string | The unicode string to be sent |
sleepFrequency | int | How many characters to send between sleep calls |
sleepLength | int | How long, in milliseconds, to sleep for at each sleep call |
return | void |
public static SetValue ( |
||
element | ||
value | string | |
return | void |