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"
.
You can define variables that will not be shared with LLM providers
act()
to perform complex actions. For multi-step actions, use Agent
instead
ObserveResult
to act()
to perform the suggested action, which will yield a faster and cheaper result (no LLM inference).ActOptions
| ObserveResult
ActOptions
:iframes: true
if the target element exists within an iframeObserveResult
:Promise<ActResult>