Reference
Act
Perform actions on the current page.
act()
allows Stagehand to interact with a web page. Provide an action
like "Click on the add to cart button"
, or "Type 'Browserbase' into the search bar"
.
Small atomic goals perform the best. Avoid using act()
to perform complex actions.
Arguments: ActOptions
Describes the action to perform
Specifies the model to use
Configuration options for the model client
Determines if vision-based processing should be used. Defaults to “fallback”
Variables to use in the action. Variables in the action string are referenced using %variable_name%
Timeout in milliseconds for waiting for the DOM to settle
Returns: Promise<ActResult>
If the action was completed successfully
Details about the action’s execution
The action performed