IMouse Methods
Click
Overload List
Name
Description
Click(IEngineResult, MouseButton, Boolean, Nullable<Point>)
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:
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]
Additional offset applied to where image or text was found (in pixels). By default null
Click(Point, MouseButton, Boolean)
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:
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
Down
Overload List
Name
Description
Triggers a MOUSE_DOWN event on the subject under test
Triggers a MOUSE_DOWN event on the subject under test
Down(IEngineResult, MouseButton, Nullable<Point>)
Triggers a MOUSE_DOWN event on the subject under test.
Syntax:
Parameter
Description
result
IEngineResult used to position the mouse
[mouseButton]
Mouse button to press. By default MouseButton.Left
[positionOffset]
Additional offset applied to where image or text was found (in pixels). By default null
Down(Point, MouseButton)
Triggers a MOUSE_DOWN event on the subject under test.
Syntax:
Parameter
Description
target
Position where press the mouse button
[mouseButton]
Mouse button to press. By default MouseButton.Left
Move
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
Move(IEngineResult, Boolean, Nullable<Point>)
Moves the mouse to an absolute position on the subject under test
Syntax:
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]
Additional offset applied to where image or text was found (in pixels). Not set by default.
Move(Point, Boolean)
Moves the mouse to an absolute position on the subject under test
Syntax:
Parameter
Description
target
Absolute position on the subject under test
[withSlowApproach]
Jumps from the current position to a position close to target and then moves pixel by pixel to the target position. False by default.
MoveOutOfScreen
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:
MoveRelative
Moves the mouse relative to the current position on the subject under test
Syntax:
Parameter
Description
x
Vertical movement in pixels
y
Horizontal movement in pixels
[slowMove]
If true the mouse moves slowly by the indicated offsets, otherwise it jumps directly to the new position. True by default.
ScrollWheel
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:
Parameter
Description
direction
scroll direction
[increments]
amount of scroll moves (defined by the target operating system). By default 1.
[target]
Point at which the scroll should take place. By default not set.
Up
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
Up(IEngineResult, MouseButton, Nullable<Point>)
Triggers a MOUSE_UP event on the subject under test
Syntax:
Parameter
Description
result
IEngineResult used to position the mouse
[mouseButton]
Mouse button to use for click. By default MouseButton.Left
[positionOffset]
Additional offset applied to where image or text was found (in pixels). By default null
Up(Point, MouseButton)
Triggers a MOUSE_UP event on the subject under test
Syntax:
Parameter
Description
target
Position where to release the mouse
[mouseButton]
Mouse button to release. By default MouseButton.Left
Up(MouseButton)
Triggers a MOUSE_UP event on the subject under test
Syntax:
Parameter
Description
[mouseButton]
Mouse button to release. By default MouseButton.Left
Last updated