Actions
Actions are the operations performed on the web elements. They simulate user interactions, such as clicking, typing, and selecting elements on a web page. This page provides a breakdown of all supported actions, organized into categories for easy reference.
Input Actions
Fill
The Fill action allows you to enter text into input fields. This is commonly used to simulate user input, such as typing a username or password into a form field.
To fill a value into an input field:
- Select the Fill action from the actions list.
- Enter the action name in the Action Name field.
- Enter the text value in the Value field.
- Click the Add Action button to finalize the action.
Fill Configuration:
-
Action Name
A unique name for the action. -
Value
The text value to be filled into the input field. -
Timeout in milliseconds (Optional)
The maximum time to wait for the element to be visible or interactable before performing the action. -
Force Action (Optional)
If enabled, the action will be performed even if the element is not visible or interactable.
Details:
This action interacts with a web element by performing the following steps:
-
Actionability Check
Ensures the element is ready and actionable before proceeding. -
Focus and Fill
Focuses the element, fills it with the specified text, and triggers an input event. To clear the input field, simply pass an empty string. -
Error Handling for Unsupported Elements
If the target element is not an<input>
,<textarea>
, or[contenteditable]
element, the action will fail. However, if the element is inside a<label>
element with an associated control, that control will be filled instead.
For advanced control over keyboard events, use type for precise keystroke handling.
Clear
The Clear action removes any existing text from an input field, preparing it for new input.
To clear an input field:
- Select the Clear action from the actions list.
- Enter the action name in the Action Name field.
- Click the Add Action button to finalize the action.
Clear Configuration:
-
Action Name
A unique name for the action. -
Timeout in milliseconds (Optional)
Specifies the maximum time to wait for the element to be visible before performing the action. -
Force Action (Optional)
If enabled, clears the input regardless of visibility.
Details:
This action interacts with a web element by performing the following steps:
-
Actionability Check
Ensures the element is ready and actionable before proceeding. -
Error Handling for Unsupported Elements
If the target element is not an<input>
,<textarea>
, or[contenteditable]
element, the action will fail. However, if the element is inside a<label>
element with an associated control, that control will be filled instead.
Select Option
The Select Option action selects a specified option from a dropdown menu or <select>
element. This can be based on the option’s visible text, value, or index.
To select an option:
- Select the Select Option action from the actions list.
- Enter the action name in the Action Name field.
- Specify the option(s) to select in Option Value(s).
- Click the Add Action button to finalize the action.
Select Option Configuration:
-
Action Name
A unique name for the action. -
Option Value(s)
Specifies the option(s) to select, based on text, value, or index. -
Timeout in milliseconds (Optional)
Maximum time to wait for the element to be interactable. -
Force Action (Optional)
If enabled, selects the option even if the element is not visible or interactable.
Details:
This action selects options from a <select>
element by following these steps:
-
Actionability Check
Ensures the<select>
element is ready and interactive before proceeding. -
Option Selection
Waits until all specified options are present within the<select>
element and then selects them. -
Error Handling for Unsupported Elements
If the target web element is not a<select>
element, an error will be thrown. However, if the element is inside a<label>
with an associated control, that control will be used instead. -
Event Triggers
After all specified options are selected, the action triggerschange
andinput
events.
Focus
The Focus action moves the browser’s focus to the specified element, often used before interacting with form fields or other interactive elements.
To focus on an element:
- Select the Focus action from the actions list.
- Enter the action name in the Action Name field.
- Click the Add Action button to finalize the action.
Focus Configuration:
-
Action Name
A unique name for the action. -
Timeout in milliseconds (Optional)
Maximum wait time for the element to become focusable.
Click Actions
Click
The Click action simulates a single mouse click on an element, such as a button, link, or checkbox.
To click on an element:
- Select the Click action from the actions list.
- Enter the action name in the Action Name field.
- Select/Fill the options (leave empty to go with the default values.)
- Click the Add Action button to finalize the action.
Click Configuration:
-
Action Name
A unique name for the action. -
Button
Specifies the mouse button to use (left
,right
, ormiddle
).- Defaults to
left
.
- Defaults to
-
Click Count
Number of times to click.- Defaults to
1
.
- Defaults to
-
Delay
Time to wait betweenmouse down
andmouse up
in milliseconds.- Defaults to
0
.
- Defaults to
-
Modifiers (Optional)
Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. -
Timeout in milliseconds (Optional)
Maximum wait time for the element to be interactable. -
Force Action (Optional)
If enabled, clicks even if the element is not visible.
Details
This method performs a click action on the specified element by executing the following steps:
-
Actionability Check
Waits for the element to be ready and interactive, unless Force Click is enabled. -
Scroll into View
Scrolls the element into view if it is not already visible. -
Navigation Wait (if applicable)
Waits for any navigation triggered by the click to either complete or fail. -
Error Handling
If the element becomes detached from the page at any point during these steps, the click action will fail, throwing an error.
Timeout Behavior: If the action takes longer than the specified timeout, a Timeout Error will be thrown. Setting the timeout to zero disables the timeout limit entirely.
Double Click
The Double Click action simulates two rapid clicks on an element, often used to trigger specific functionality requiring a double-click interaction.
To double-click on an element:
- Select the Double Click action from the actions list.
- Enter the action name in the Action Name field.
- Select/Fill the options (leave empty to go with the default values.)
- Click the Add Action button to finalize the action.
Double Click Configuration:
-
Action Name
A unique name for the action. -
Button
Specifies the mouse button to use. -
Delay (Optional)
Delay in milliseconds between the two clicks. -
Modifiers (Optional)
Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. -
Timeout in milliseconds (Optional)
Maximum wait time for the element to be interactable. -
Force Action (Optional)
Clicks regardless of element visibility.
Details
This method performs a click action on the specified element by executing the following steps:
-
Actionability Check
Waits for the element to be ready and interactive, unless Force Click is enabled. -
Scroll into View
Scrolls the element into view if it is not already visible. -
Navigation Wait (if applicable)
Waits for any navigation triggered by the click to either complete or fail. -
Error Handling
If the element becomes detached from the page at any point during these steps, the double click action will fail, throwing an error.
Timeout Behavior: If the action takes longer than the specified timeout, a Timeout Error will be thrown. Setting the timeout to zero disables the timeout limit entirely.
A double-click dispatches two click events followed by a single double-click event on the element.
Key Press Actions
Press
The Press action simulates a keypress event on the specified element. This is useful for interacting with elements that respond to keyboard inputs, such as pressing Enter to submit a form.
To press a key on an element:
- Select the Press action from the actions list.
- Enter the action name in the Action Name field.
- Select the Key to be pressed in the Key field.
- Click the Add Action button to finalize the action.
Press Configuration:
-
Action Name
A unique name for the action. -
Key
The key to be pressed, such asEnter
,Escape
, or any other key. -
Modifiers (Optional)
- Following modification shortcuts are also supported:
Alt
,Control or Meta (macOS)
&Shift
. - Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used.
"ControlOrMeta"
resolves to "Control" on Windows and Linux and to "Meta" on macOS.
- Following modification shortcuts are also supported:
-
Perform event on page (Optional)
Perform the event on the page instead of the element. Eg: Pressing a key on the page. -
Delay in milliseconds (Optional)
Delay between pressing and releasing the key. -
Timeout in milliseconds (Optional)
Maximum wait time for the element to accept the key press.
Type
Most of the time, you should input text with Fill (See the Input Actions section above). You only need to type characters if there is special keyboard handling on the page.
The Type action simulates typing a sequence of characters into the specified element. This is useful for entering text into input fields, such as usernames, passwords, or other text inputs.
To type text into an element:
- Select the Type action from the actions list.
- Enter the action name in the Action Name field.
- Enter the text in the Text field.
- Click the Add Action button to finalize the action.
Type Configuration:
-
Action Name
A unique name for the action. -
Text
The text to be typed, such asusername
,password
, or any other string. -
Delay in milliseconds (Optional)
Delay between each character typed, simulating a more natural typing speed. -
Timeout in milliseconds (Optional)
Maximum wait time for the element to accept the text input.
Mouse Actions
Hover
The Hover action moves the mouse pointer over an element, triggering any hover-related interactions or animations, such as tooltips.
To hover over an element:
- Select the Hover action from the actions list.
- Enter the action name in the Action Name field.
- Click the Add Action button to finalize the action.
Hover Configuration:
-
Action Name
A unique name for the action. -
Timeout in milliseconds (Optional)
Maximum wait time for the element to become hoverable. -
Force Action (Optional)
Hovers even if the element is not visible or interactable.