Skip to main content
Perform a freeform AI action on the page. The AI agent interprets the prompt, identifies the relevant elements, and executes the appropriate browser actions.
await page.act("Scroll down and click the 'Load More' button")
await page.act("Click the login button")
await page.act("Select 'United States' from the country dropdown")
ParameterTypeRequiredDescription
promptstr / stringYesNatural language instruction describing the action to perform.
skip_refresh / skipRefreshbool / booleanNoSkip refreshing the page state before acting. Defaults to False.
use_economy_tree / useEconomyTreebool / booleanNoUse a lighter DOM representation to reduce token usage. Defaults to False.
Returns None / void.