# Press Keys

Emulation of key presses on the keyboard. It can emulate both continuous text input and key combinations, as well as any combinations of special keys and text. The combinations can include not only keyboard keys but also mouse actions. To record key combinations, open the selector window and press the "Record" button.

<table data-header-hidden><thead><tr><th width="248" valign="top"></th><th width="298" valign="top"></th></tr></thead><tbody><tr><td valign="top">Selector</td><td valign="top">[Selector] The identifier of the browser window and web page element. If this property is specified, the focus will be set on the specified web page element before starting text input.</td></tr><tr><td valign="top">Keys</td><td valign="top"><p>[Text] The text or keys that need to be emulated.</p><p>For example:</p><ul><li>"Test text" - the keys for entering this string will be emulated;</li><li>"[ENTER]" - the Enter key will be pressed.</li></ul><p>Within a single block, you can combine continuous text input and key presses. To record key combinations, open the selector window and press the "Record" button.</p></td></tr><tr><td valign="top">Process ID</td><td valign="top"><p>[Link] A variable that stores the process and tab identifier of the browser used by this block.</p><p>If the property is left empty, or if the "Process ID" variable was not previously assigned at the time of opening the browser, the application and browser tab will be determined from the content of the corresponding selector line.</p><p>The process ID can be obtained, for example, using the "Launch IE", "Launch Chrome", or "Attach to Browser" blocks.</p></td></tr><tr><td valign="top">Interactively</td><td valign="top"><p>If specified, pauses will be inserted between key presses.</p><p>It is recommended to enable this property if individual letters are lost during text input emulation due to the application's or web page's characteristics.</p></td></tr><tr><td valign="top">Pause Time</td><td valign="top">[Number] If the "Interactively" property is specified, a pause in milliseconds will be inserted between key presses as specified here.</td></tr><tr><td valign="top">Select All</td><td valign="top">Before starting input, send the "select all" key combination (<code>Ctrl+A</code>).</td></tr><tr><td valign="top">Text Only</td><td valign="top">If enabled, all text is treated as characters and will not be broken into control keys.</td></tr><tr><td valign="top">Delay Before</td><td valign="top">[Number] Delay in seconds before executing the block.</td></tr><tr><td valign="top">Delay After</td><td valign="top">[Number] Delay in seconds after executing the block.</td></tr><tr><td valign="top">Wait Time</td><td valign="top">[Number] The maximum wait time for the specified element in seconds.</td></tr><tr><td valign="top">X Offset</td><td valign="top"><p>[Number] The relative click offset on the X coordinate from the top left corner of the element.</p><p>If no value is specified (the property is empty), the center of the element will be used as the click point.</p></td></tr><tr><td valign="top">Y Offset</td><td valign="top"><p>[Number] The relative click offset on the Y coordinate from the top left corner of the element.</p><p>If no value is specified (the property is empty), the center of the element will be used as the click point.</p></td></tr><tr><td valign="top">Wait Selector</td><td valign="top"><p>[Selector] The identifier of the user interface element.</p><p>If the selector is empty, the block will not wait for the appearance of this element.</p></td></tr><tr><td valign="top">Wait Selector Type</td><td valign="top"><p>Select the type of wait:</p><ul><li>AppearAfter - appearance after text input;</li><li>DisappearAfter - disappearance after text input;</li><li>AppearBefore - appearance before text input;</li><li>DisappearBefore - disappearance before text input.</li></ul><p>When selecting After - a mouse click will be made first, then text input, then the wait selector will be checked.</p><p>When selecting Before - a mouse click will be made first, then the wait selector will be checked, then text input.</p></td></tr><tr><td valign="top">Delay Before Checking Wait Selector</td><td valign="top">[Number] Delay before checking the wait selector.</td></tr><tr><td valign="top">Wait Time for Wait Selector</td><td valign="top">[Number] The maximum wait time for the element specified in the wait selector in seconds.</td></tr><tr><td valign="top">Number of Attempts for Wait Selector</td><td valign="top"><p>[Number] The number of attempts for the wait selector.</p><p>If the wait selector is not found, the block will click on the main selector.</p></td></tr><tr><td valign="top">Autoscrolling</td><td valign="top">If selected, the list will automatically scroll to the element that is outside the visible area.</td></tr><tr><td valign="top">Simulate Movement</td><td valign="top">When enabled, the mouse cursor movement from the current position to the point calculated by the block will be simulated.</td></tr><tr><td valign="top">Simulate Input</td><td valign="top">(Only for IE) When enabled, input will be simulated using the browser.</td></tr><tr><td valign="top">Automatic Key Release</td><td valign="top"><p>When enabled, pressed keys</p><p>(with the modifier <code>+</code>, for example, <code>[+CTRL]</code>) will be automatically released after the block is executed.</p><p>If the property is disabled, you will need to manually release the previously pressed key (with the modifier <code>-</code>, for example, <code>[-CTRL]</code>).</p></td></tr><tr><td valign="top">Convert to Key Codes</td><td valign="top"><p>Only for Linux.</p><p>Allows the specified text to be converted into key codes. This is used if the standard text input method does not work.</p><p>The property selects the key combination used to switch languages.<br><br>Important: in this mode, you cannot combine both system keys and text. That is, you will need to use two blocks.</p></td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - by default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that the blocks will output during operation. Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - main information output;</li><li>"Detailed" - detailed information output.</li></ul><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error Text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block.</td></tr></tbody></table>
