Method Signatures
- TypeScript
- Python
Parameters
Natural language description of the action to perform.
Key-value pairs for variable substitution using
%variable%
syntax. Prevents sensitive data from appearing in logs.Override the default LLM model for this action.
Model-specific configuration options.Options:
temperature
, maxTokens
, apiKey
Maximum time to wait for DOM to stabilize before attempting action.Default:
30000
Maximum time to wait for the action to complete.
Set to
true
if target element is within an iframe.Default: false
Previously observed action to execute directly (enables self-healing).
Returns Promise<ActResult>
Whether the action was completed successfully.
Details about the action’s execution.
The action that was performed.
Response
Error Types
- TimeoutError - Action exceeded timeout limits
- ElementNotFoundError - Target element could not be located
- ActionFailedError - Action could not be completed
- StagehandError - General Stagehand-specific errors