Input - Click mouse

Declaration

<AMINPUT ACTIVITY="click_mouse" BUTTON="text (options)" CLICK="text (options)" />

Related Topics

Description

Clicks the mouse according to the parameters specified.

Practical usage

Mostly used after a Input - Move mouse or Interactivity - Move mouse to object step to click the specified button after the mouse has been moved to the desired area or object.

Parameters

General

Property Type Required Default Markup Description
Button to click Text (options) Yes Left button
  • BUTTON="center"
  • BUTTON="right"
The button that should be clicked on the mouse. The available options are:
  • Left button - Click the left mouse button.
  • Middle (center) button - Click the center mouse button.
  • Right button - Click the right mouse button.
Click action Text (options) Yes Single click
  • CLICK="double"
  • CLICK="hold_down"
  • CLICK="release"
The type of click that should take place on the mouse. The available options are:
  • Single click -  Single click the mouse button specified.
  • Double click: Double-click with the mouse button specified.
  • Hold down: Hold-down the mouse button specified.
  • Release: Release the mouse button specified.
NOTE: The Hold down option will hold down the mouse button for the duration of the task. If you want the mouse button released during execution, make sure to add a step that releases the mouse button.

Description

Error Causes

On Error

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

This sample task runs the following steps:

  1. An Open Web Page action opens the web page "www.google.com".

  2. A Set Text action sets the text "Business Process Automation Software" in the search box.

  3. A Move Mouse to Object action moves the mouse cursor to the "Google Search" button.

  4. A Click Mouse action clicks the "Google Search" button.

Copy
<AMBROWSER URL="www.google.com" SESSION="BrowserLegacySession1" />
<AMBROWSER ACTIVITY="setvalue" HTMLNAME="q" SESSION="BrowserLegacySession1" VALUE="Business Process Automation Software" ATTRIBUTE=":text" />
<AMINTERACT ACTIVITY="mouse_to_object" WINDOWTITLE="Google - Internet Explorer" OBJECTPROPERTIES="Toolkit=UIAutomation,Type=50000,Class=,FrameworkId=,Name=Google Search,AutomationId=,Value=,ParentPath=50032|50033|50033|50033|50033|50025|50000,Occurrence=,X=,Y=" />
<AMINPUT ACTIVITY="click_mouse" />