TestResults.io
  • What is TestResults.io
  • System Architecture
  • Regulated Markets
    • Health Care Industry
    • Financial Services Industry
  • What's new?
    • Update Instruction
      • Update of the Designer extension in Visual Studio
      • Update the Execution Engine
      • Update the Base- and Environment Models
    • Migration to new project file
  • Designer
    • Overview
    • First Steps
    • Installation
    • TestResults.io solution
    • The development environment
      • Tool Window Overview
        • Test Environments
          • Steps to configure a SUT VM
          • How to access files on the system under test
        • Remote Viewer
          • Control Mode
          • Capture Mode
          • Screen Editor
          • Capture Single Image
        • Screen Explorer
        • Test Case Designer
        • Image Explorer
        • API Testing
        • TestResults.io options
          • Engines
          • Servers
    • Test Cases
      • Adding Test Cases
      • Test Case structure
      • Simple Test Case (Example)
      • Executing your Test Case
      • Generating Test Containers
      • Publishing Test Cases
      • Execution Variables
    • Software Models
      • Adding SW Models
      • Referencing the Model in the Test Case
      • Generating Test Containers
      • Publishing SW Models
      • Screens and Screen Elements
        • Tables
        • Visual Sense
        • Custom Screen Elements
    • Installers
      • Adding Installers
      • Generating Test Containers
      • Publishing Installers
    • Automation Framework Reference
      • Attributes
      • Enumerations
      • Filters
        • IImageFilter Interface
        • Select
        • Resize
      • GlobalEngineParameters
      • ImageDetectionParameters
      • ImageReference
      • Interfaces
        • ITester Interface
          • ITester Methods
          • ITester Properties
        • ITestee Interface
          • ITestee Methods
        • IConnections Interface
          • IConnections Methods
          • IConnections Properties
        • IDebug Interface
        • IEngineResult
        • IHelpers Interface
        • IImageHelper Interface
          • IImageHelper Methods
        • IKeyboard Interface
          • IKeyboard Methods
        • IMouse Interface
          • IMouse Methods
          • IMouse Properties
        • IReport Interface
          • IReport Methods
        • ISUTConnection Interface
      • OcrEngineParameters
        • Best practise
        • IronOcrEngineParameters
        • LEADOcrEngineParameters
        • OcrEngineRelatedCharacters
        • OcrPreprocessingParameters
      • ResultRectangle
      • SutNotReadyException
      • TestStepAbortedException
    • FAQ
      • Two-factor authentication (2FA) and One Time Passwords (OTP)
      • Receive and verify Emails
      • Using Excel as test data source
      • Verify PDF Content
  • Portal
    • Overview
    • First Steps
    • User's Guide
      • Login
      • Projects
      • Dashboard
      • Test Cases
      • Software & Environments
      • Test Sets
      • Job Queue
      • Management
      • Notifications Summary
    • Automation Engineer's Guide
      • Test Automation Workflow
      • Automating a test case
      • Enabling Software & Environments
    • REST API Reference
      • Authentication
      • Projects
      • Test Sets
      • Test Cases
      • Test Plans
      • Test Reports
      • Files
      • Software
      • Environments
      • Untitled
      • Executions
      • Favorites
      • Statistics
      • User Management
      • Customer Management
      • Notifications
      • Configurations
      • Invoicing
  • Models
    • Overview
    • Base Model
      • BaseScreen
        • BaseScreen Properties
        • BaseScreen Methods
      • OnScreenElement
        • OnScreenElement Methods
        • OnScreenElement Properties
      • Primitives
        • Button
          • Button Methods
          • Button Properties
        • Checkbox
          • Checkbox Methods
        • ContextMenu
          • ContextMenu Methods
          • ContextMenu Properties
        • Dropdown
          • Dropdown Methods
          • Dropdown Properties
        • DropdownMenu
          • DropdownMenu Methods
          • DropdownMenu Properties
        • GenericScroller
          • GenericScroller Methods
          • GenericScroller Properties
        • HorizontalScroller
        • IconButton
          • IconButton Properties
        • Label
        • LabelWithButton
          • LabelWithButton Properties
        • LabelWithCheckbox
          • LabelWithCheckbox Properties
        • LabelWithValue
          • LabelWithValue Methods
          • LabelWithValue Properties
        • PwTextBox
          • PwTextBox Methods
        • TextBox
          • TextBox Methods
          • TextBox Properties
        • Tables and lists
          • Column
            • Column Methods
            • Column Properties
          • ItemList
            • ItemList Methods
            • ItemList Properties
          • Row
            • Row Methods
            • Row Properties
          • TableBase
            • TableBase Methods
            • TableBase Properties
        • LabelWithElementBase
          • LabelWithElementBase Properties
      • Enumerations
      • Extensions
        • EngineResultExtensions Methods
        • EnumExtensions Methods
        • ReportExtensions Methods
        • StringExtensions Methods
        • TesterConnectionExtensions Methods
        • TesterDebugExtensions Methods
        • TesterHelperExtensions Methods
        • TesterMouseExtensions Methods
        • TesterOnScreenElementExtensions
        • TesterSelectExtensions Methods
      • Helper Classes
        • BaseModelHelpers
          • BaseModelHelpers Methods
          • BaseModelHelpers Properties
        • Attributes for Designer
        • ListHelpers
      • Exceptions
        • ElementNotFoundException
        • InteractionFailedException
        • ScreenNotFoundException
      • Interfaces
        • IAppBasics Interface
          • IAppBasics Methods
          • IAppBasics Properties
        • IBrowser
        • ICommandLineWindow
        • IScroller Interface
          • IScroller Methods
          • IScroller Properties
        • ISutLocale Interface
          • ISutLocale Methods
          • ISutLocale Properties
        • ISystemHelpers
        • ISystemInteractions
        • IWindow
    • Environment Model
      • Windows
        • Screens
          • CmdWindow
            • CmdWindow Methods
            • CmdWindow Properties
          • FileDialog
            • FileDialog Methods
            • FileDialog Properties
          • FileExplorer
            • FileExplorer Properties
          • RunWindow
            • RunWindow Methods
            • RunWindow Properties
          • Window
            • Window Methods
            • Window Properties
        • SutLocale
          • SutLocale Methods
          • SutLocale Properties
        • SystemHelpers
          • SystemHelpers Methods
          • SystemHelpers Properties
        • SystemInteractions
        • WebBrowser
          • Browser
            • Browser Methods
            • Browser Properties
          • BrowserScroller
            • BrowserScroller Methods
            • BrowserScroller Properties
          • AuthenticationDialog
            • AuthenticationDialog Methods
            • AuthenticationDialog Properties
          • DownloadDialog
            • DownloadDialog Methods
            • DownloadDialog Properties
        • EnvironmentModel Enumerations
        • Interfaces
          • IWebAppBasics
            • IWebAppBasics Property
Powered by GitBook
On this page
  • Click
  • Click(IEngineResult, MouseButton, Boolean, Nullable<Point>)
  • Click(Point, MouseButton, Boolean)
  • Down
  • Down(IEngineResult, MouseButton, Nullable<Point>)
  • Down(Point, MouseButton)
  • Move
  • Move(IEngineResult, Boolean, Nullable<Point>)
  • Move(Point, Boolean)
  • MoveOutOfScreen
  • MoveRelative
  • ScrollWheel
  • Up
  • Up(IEngineResult, MouseButton, Nullable<Point>)
  • Up(Point, MouseButton)
  • Up(MouseButton)

Was this helpful?

  1. Designer
  2. Automation Framework Reference
  3. Interfaces
  4. IMouse Interface

IMouse Methods

PreviousIMouse InterfaceNextIMouse Properties

Last updated 5 years ago

Was this helpful?

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 , 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]

Additional offset applied to where image or text was found (in pixels). By default null

Click(Point, MouseButton, Boolean)

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

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:

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]

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:

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

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:

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]

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:

void Move(
	Point target,
	bool withSlowApproach = false
)

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

Syntax:

void MoveOutOfScreen()

MoveRelative

Moves the mouse relative to the current position on the subject under test

Syntax:

void MoveRelative(
	int x,
	int y,
	bool slowMove = true
)

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:

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]

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:

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]

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:

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

Up(MouseButton)

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

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 , 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 , followed by a MOUSE_UP event is executed.

Type:

Type:

Type:

Type: <>

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 , followed by a MOUSE_UP event is executed.

Type:

Type:

Type:

Type:

Type:

Type: <>

Type:

Type:

Type:

Type:

Type: <>

Type:

Type:

Moves the mouse cursor of screen (on the right side, in the middle of the screen). If is set, moves the mouse by this offset instead.

Type:

Type:

Type:

Type:

Type:

Type: <>

Type:

Type:

Type: <>

Type:

Type:

Type:

IEngineResult
Boolean
Nullable
Point
Point
Boolean
IEngineResult
Nullable
Point
Point
IEngineResult
Boolean
Nullable
Point
Point
Boolean
Int32
Int32
Boolean
Int32
Nullable
Point
IEngineResult
Nullable
Point
Point
Click(IEngineResult, MouseButton, Boolean, Nullable<Point>)
Click(Point, MouseButton, Boolean)
Down(IEngineResult, MouseButton, Nullable<Point>)
Down(Point, MouseButton)
Move(IEngineResult, Boolean, Nullable<Point>)
Move(Point, Boolean)
Up(IEngineResult, MouseButton, Nullable<Point>)
Up(Point, MouseButton)
Up(MouseButton)
MouseButton
MouseButton
MouseButton
MouseButton
ScrollDirection
MouseButton
MouseButton
MouseButton
MouseClickDelay
MouseClickDelay
Properties.MouseMoveOutOffset
MouseClickDelay
MouseClickDelay