Timing Controls
Sleep Times
before_sleep_time
Wait before executing the action. Use when page needs to load or settle.end_sleep_time
Wait after action completes. Use when subsequent actions depend on this action’s effects.Default Values
Sleep times must be between 0 and 10 seconds.
Automation-Level Retries
max_retries on the automation reruns the entire automation when an unexpected error occurs (e.g. browser crash, network failure).
AssertionError failures (e.g. failed assertions) are never retried regardless of max_retries. Retries only apply to unexpected runtime errors.Element-Level Retry Configuration
Control how Optexity retries finding elements.How Retries Work
- Attempt to find element using
commandorxpath - If not found within timeout, retry
- After all tries exhausted, use AI with
prompt_instructions - If AI can’t find it, action fails
Handling New Tabs
expect_new_tab
Set when action opens a new browser tab:expect_new_tab=True:
max_new_tab_wait_timeautomatically set to10.0- Automation waits for new tab
- Focus switches to new tab