Skip to content

Press Key

Simulate key press actions on the page

Target element

Find the Css Selector or XPath of the element where you want to simulate the key press. If you want to perform the action on the entire page, you don’t need to fill in this value.

Action

With this node, you can perform the following actions

Press Key

You can select multiple keys as if operating on a keyboard

  • Key: You can choose the keys to perform the key press action
Example

Normally, when logging into an account and choosing to save it, the next login will display the account in that input field. If you want to enter a different value, you need to use the Press Key node to clear the existing text in the input field as follows

Attributes

First, to clear the text, you need to identify the selector of the input field. Here, I have obtained the selector as #identifierId

Next, I will use the key combination Ctrl+a+Backspace to clear the value in the field.

The configuration of the Press Key node will be as follows

Attributes

When running the node, I see that the value in the field has been cleared

Attributes

Type Text

You can type the desired content into the target element. The content can be explicit text or text stored in a variable, table, or during data iteration...

  • Delay between key presses (milliseconds): You can adjust the speed between characters when typing content by specifying a fixed time or a random time within a specified range
Example

Here, I will use the Press Key node with the Type Text option to fill in the account details in a Google account login process

Attributes

First, I will prepare an Excel data file and import it into the Spreadsheet node, which will give me a data preview as follows

Attributes

Then, I will use the Press Key node to fill in the value taken from the Spreadsheet node into the account input field. First, I need to identify the selector of the input field, which I have obtained as #identifierId. Next, instead of using a fixed value, I will use the expression {{spreadSheets.data.[profileId].email}} to retrieve the value corresponding to the current profile being processed. Finally, I will configure the delay between each character to about 200 milliseconds. The configuration of the node will be as follows

Attributes

When running the node, I see that the value in the field has been filled in

Attributes

Paste Text

You can paste the desired content into the target element. The content can be explicit text or text stored in a variable, table, or during data iteration...

Example

Here, I will use the Press Key node with the Paste Text option in a process to import a Keplr wallet. The requirement here is to paste the list of seed phrase words into the import process

Attributes

First, I will prepare an Excel data file containing the list of seed phrases and import it into the Spreadsheet node, which will give me a data preview as follows

Attributes

Then, I will use the Press Key node to fill in the value taken from the Spreadsheet node into the account input field. First, I need to identify the selector of the input field, which I have obtained as [type="password"]. Next, instead of using a fixed value, I will use the expression {{spreadSheets.data.[profileId].words}} to retrieve the value corresponding to the current profile being processed. The configuration of the node will be as follows

Attributes

When running the node, I see that the value in the field has been filled in

Attributes

Press and Hold Key

Select one or more keys to press and hold

  • Key hold duration (seconds): The amount of time you want to hold the key
Example

Here, I will use the Press Key node with the Press and Hold Key action to move a character in the Pixel game to a specified position

Attributes

To achieve this, I will configure the Press and Hold Key action in the Press Key node, then select the ArrowRight key to move the character to the right with a key hold duration of 1.4 seconds. Since I want to perform the key press action on the entire page, no CSS Selector or XPath is needed

Attributes

When I run the node, the character moves as initially desired

Attributes

Release Key

Release a key that is being pressed and held

Example

Here, I will use the Press Key node with the Press and Hold Key action to move a character in the Pixel game, then use the Release Key action in a second Press Key node to stop the movement from the first Press Key node

Attributes

To achieve this, I will configure the Press and Hold Key action in the first Press Key node, then select the ArrowRight key to move the character to the right with a key hold duration empty to make the character move indefinitely. Since I want to perform the key press action on the entire page, no CSS Selector or XPath is needed

Attributes

Next, I will use a Delay node to allow the character to move for a certain amount of time with the first Press Key node running

Finally, I create a second Press Key node to stop the character’s movement after a period of movement. I will use the Release Key action with the ArrowRight key, matching the first Press Key node

Attributes

The combination of these nodes will be as follows

Attributes

When I run the node, the character moves as initially desired

Attributes

Note

Pressing keys only simulates pressing keyboard keys on the webpage. This means it cannot trigger browser shortcuts like opening a new tab or closing a tab, or system shortcuts like copy and paste.