Documentation Index
Fetch the complete documentation index at: https://docs.optexity.com/llms.txt
Use this file to discover all available pages before exploring further.
An action_node represents a single atomic action. Each node contains exactly one action type.
Structure
{
"type": "action_node",
"interaction_action": {
"click_element": {
"command": "get_by_role(\"button\", name=\"Submit\")",
"prompt_instructions": "Click the submit button"
}
},
"before_sleep_time": 0.0,
"end_sleep_time": 1.0
}
Action Types
Each action node contains exactly one of:
| Action | Purpose | Documentation |
|---|
interaction_action | Click, type, select, navigate | Interaction Actions |
extraction_action | Extract data, screenshots | Extraction Actions |
assertion_action | Verify page conditions | Assertion Actions |
python_script_action | Custom Python code | Python Scripts |
sleep_action | Pure wait / timing step | Sleep Action |
Timing Properties
| Property | Type | Default | Description |
|---|
before_sleep_time | float | 0.0 (extractions: 3.0) | Seconds to wait before action |
end_sleep_time | float | 1.0 (extractions: 0.0) | Seconds to wait after action |
expect_new_tab | bool | False | Action opens a new tab |
max_new_tab_wait_time | float | 0.0 (if expect_new_tab: 10.0) | Max wait for new tab |
Default Timing by Action Type
| Action Type | before_sleep_time | end_sleep_time |
|---|
| Interaction | 0.0 | 1.0 |
| Extraction | 3.0 | 0.0 |
| Assertion | 0.0 | 0.0 |
| 2FA | 0.0 | 0.0 |
Examples
Basic Click
{
"type": "action_node",
"interaction_action": {
"click_element": {
"command": "get_by_role(\"button\", name=\"Continue\")",
"prompt_instructions": "Click continue"
}
}
}
With Custom Timing
{
"type": "action_node",
"interaction_action": {
"click_element": {
"command": "get_by_role(\"button\", name=\"Submit\")"
}
},
"before_sleep_time": 2.0,
"end_sleep_time": 3.0
}
Sleep-Only Node
Use a sleep_action when you want to pause without performing any browser interaction. sleep_time is specified in seconds:
{
"type": "action_node",
"sleep_action": {
"sleep_time": 5.0
}
}
Fail State Node
A fail_state_action is used to handle failure states in the automation. It will stop the automation, raise an exception with the provided failure message and mark it as failed.
{
"type": "action_node",
"fail_state_action": {
"failure_message": "Automation completed at one of the failure states."
}
}
fail_state_action can also be used with variables.
{
"type": "action_node",
"fail_state_action": {
"failure_message": "Error in login process for user {username[0]}"
}
}
Opens New Tab
{
"type": "action_node",
"interaction_action": {
"click_element": {
"command": "get_by_role(\"link\", name=\"View Details\")"
}
},
"expect_new_tab": true
}