/
Press and hold on a button

Press and hold on a button

Home | Categories | How-to-Articles | Command Reference | Examples | Troubleshooting | Cognillo.com

This article shows you how to press and hold down a button that has a text label using Genta Automation.


Syntax

Press and Hold(n) "button label here" button

Example 1

The example syntax below will command Genta to locate the button labeled “PRESS & HOLD” and press and hold it for 5 seconds.

Press and Hold(5) "PRESS & HOLD" button
Fig. 1
Fig. 2

Fig. 2 shows the expected result for Example 1.


Example 2

The example syntax below will command Genta to use a wildcard match to find a button with the first instance of “HOLD” contained within a label and press and hold it for 5 seconds.

Press and Hold(5) "*HOLD*" button
Fig. 3
Fig. 4

Fig. 4 shows the expected result for Example 2.



Related Commands

Related content