IMouse Methods
Overload List
Name | Description |
Executes a defined sequence of MOUSE_DOWN & MOUSE_UP events to simulate a mouse click. The mouse is moved to the found position and a MOUSE_DOWN event, followed by a wait time defined in MouseClickDelay, followed by a MOUSE_UP event is executed. | |
Executes a defined sequence of MOUSE_DOWN & MOUSE_UP events to simulate a mouse click. The mouse is moved to the specified target position and a MOUSE_DOWN event, followed by a wait time defined in MouseClickDelay, followed by a MOUSE_UP event is executed. |
Executes a defined sequence of MOUSE_DOWN & MOUSE_UP events to simulate a mouse click. The mouse is moved to the found position and a MOUSE_DOWN event, followed by a wait time defined in MouseClickDelay, followed by a MOUSE_UP event is executed.
Syntax:
void Click(
IEngineResult result,
MouseButton mouseButton = MouseButton.Left,
bool withSlowApproach = true,
Nullable<Point> positionOffset
)
Parameter | Description |
result | IEngineResult used to position the mouse |
[mouseButton] | Mouse button to use for click. By default MouseButton.Left |
[withSlowApproach] | If true, jumps from the current position to a position close to the result and then moves pixel by pixel to the result position before doing the click. This simulates more closely how a human interacts with the mouse and is sometimes required to make sure the click is correctly registered by the target. By default true |
[positionOffset] |
Executes a defined sequence of MOUSE_DOWN & MOUSE_UP events to simulate a mouse click. The mouse is moved to the specified target position and a MOUSE_DOWN event, followed by a wait time defined in MouseClickDelay, followed by a MOUSE_UP event is executed.
Syntax:
void Click(
Point target,
MouseButton mouseButton = MouseButton.Left,
bool withSlowApproach = true
)
Parameter | Description |
target | Position where to click with the mouse |
[mouseButton] | Mouse button to use for click. By default MouseButton.Left |
[withSlowApproach] | If true, jumps from the current position to a position close to the result and then moves pixel by pixel to the result position before doing the click. This simulates more closely how a human interacts with the mouse and is sometimes required to make sure the click is correctly registered by the target. By default true |
Overload List
Name | Description |
Triggers a MOUSE_DOWN event on the subject under test | |
Triggers a MOUSE_DOWN event on the subject under test |
Triggers a MOUSE_DOWN event on the subject under test.
Syntax:
void Down(
IEngineResult result,
MouseButton mouseButton = MouseButton.Left,
Nullable<Point> positionOffset = null
)
Parameter | Description |
result | IEngineResult used to position the mouse |
[mouseButton] | Mouse button to press. By default MouseButton.Left |
[positionOffset] |
Triggers a MOUSE_DOWN event on the subject under test.
Syntax:
void Down(
Point target,
MouseButton mouseButton = MouseButton.Left
)
Parameter | Description |
target | Position where press the mouse button |
[mouseButton] | Mouse button to press. By default MouseButton.Left |
Overload List
Name | Description |
Moves the mouse to an absolute position on the subject under test | |
Moves the mouse to an absolute position on the subject under test |
Moves the mouse to an absolute position on the subject under test
Syntax:
void Move(
IEngineResult result,
bool withSlowApproach = false,
Nullable<Point> positionOffset = null
)
Parameter | Description |
result | IEngineResult used to position the mouse |
[withSlowApproach] | Jumps from the current position to a position close to result and then moves pixel by pixel to the result position. False by default. |
[positionOffset] |
Moves the mouse to an absolute position on the subject under test
Syntax:
void Move(
Point target,
bool withSlowApproach = false
)
Moves the mouse cursor of screen (on the right side, in the middle of the screen).
If Properties.MouseMoveOutOffset is set, moves the mouse by this offset instead.
Syntax:
void MoveOutOfScreen()
Moves the mouse relative to the current position on the subject under test
Syntax:
void MoveRelative(
int x,
int y,
bool slowMove = true
)
Triggers a SCROLL mouse event on the subject under test. If target is set, the mouse first moves to the specified point on the SUT before doing the scrolling, otherwise scrolls at the current position.
Syntax:
void ScrollWheel(
ScrollDirection direction,
int increments = 1,
Nullable<Point> target = null
)
Parameter | Description |
direction | scroll direction |
[increments] | amount of scroll moves (defined by the target operating system). By default 1. |
[target] |
Overload List
Name | Description |
Triggers a MOUSE_UP event on the subject under test | |
Triggers a MOUSE_UP event on the subject under test | |
Triggers a MOUSE_UP event on the subject under test |
Triggers a MOUSE_UP event on the subject under test
Syntax:
void Up(
IEngineResult result,
MouseButton mouseButton = MouseButton.Left,
Nullable<Point> positionOffset = null
)
Parameter | Description |
result | IEngineResult used to position the mouse |
[mouseButton] | Mouse button to use for click. By default MouseButton.Left |
[positionOffset] |
Triggers a MOUSE_UP event on the subject under test
Syntax:
void Up(
Point target,
MouseButton mouseButton = MouseButton.Left
)
Parameter | Description |
target | Position where to release the mouse |
[mouseButton] | Mouse button to release. By default MouseButton.Left |
Triggers a MOUSE_UP event on the subject under test
Syntax:
void Up(
MouseButton mouseButton = MouseButton.Left
)
Parameter | Description |
[mouseButton] | Mouse button to release. By default MouseButton.Left |
Last modified 3yr ago