Input - Release key
Declaration
<AMINPUT ACTIVITY="release_key" SHIFT="YES/NO" ALT="YES/NO" CTRL="YES/NO" WINKEY="YES/NO" ALTGR="YES/NO" />
Description
Releases the specified keys that were previously held down using the Input - Hold key activity .
Practical usage
Generally used in conjunction with the Input - Hold key activity to release keys that were previously held-down spanning multiple steps. For example if the application being automated requires that the ALT key be held down while mouse clicks are taking place, that task could begin with a Hold Down Key step to hold down the ALT key, followed by the Input - Move mouse or Interactivity - Move mouse to object and Input - Click mouse steps, finally ending with this step.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Shift | Yes/No | No | No | SHIFT="YES" | Indicates that the SHIFT key should be released. Useful only if a similarly configured Input - Hold key step has been included in a previous task step. |
Ctrl | Yes/No | No | No | CTRL="YES" | Indicates that the CTRL key should be released. Useful only if a similarly configured Input - Hold key step has been included in a previous task step. |
Alt Gr | Yes/No | No | No | ALTGR="YES" | Indicates that the ALTGR (found on many international keyboard layouts) key should be released. Useful only if a similarly configured Input - Hold key step has been included in a previous task step. |
Alt | Yes/No | No | No | ALT="YES" | Indicates that the ALT key should be released. Useful only if a similarly configured Input - Hold key step has been included in a previous task step. |
Windows Key | Yes/No | No | No | WINKEY="YES" | Indicates that the Windows Key should be released. Useful only if a similarly configured Input - Hold key step has been included in a previous task step. |
Example
- 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 displays usage of a Hold Down Key and Release Key actions.
<AMINPUT ACTIVITY="hold_key" SHIFT="YES" />
<AMINTERACT ACTIVITY="mouse_to_object" WINDOWTITLE="Home - BBC News - Internet Explorer" OBJECTPROPERTIES="Toolkit=UIAutomation,Type=50020,Class=,FrameworkId=,Name=UK,AutomationId=,Value=https://www.bbc.co.uk/news/uk,ParentPath=50032|50033|50033|50033|50033|50004|50004|50008|50007|50005|50020,Occurrence=,X=,Y=" />
<AMINPUT ACTIVITY="click_mouse" CLICK="double" />
<AMINPUT ACTIVITY="release_key" SHIFT="YES" />