StagehandPage
Index
Methods
Properties
Methods
__getattr__
Parameters
name: str
Returns Any
__init__
Parameters
page: Page
session: AsyncSession
Returns None
act
Perform an action on the page using natural language. Argument
pageis automatically set.Returns SessionActResponse
The action result from Stagehand.
execute
Run an autonomous multi-step AI agent on the page. Argument
pageis automatically set.Returns SessionExecuteResponse
The result of the agent execution.
extract
Extract structured data from the page using natural language. Argument
pageis automatically set.Returns SessionExtractResponse
Extracted data matching the requested schema.
observe
Observe the page and get AI-suggested actions. Argument
pageis automatically set.Returns SessionObserveResponse
Observation result with suggested actions.
Properties
stagehand_session
Provides access to the underlying Stagehand session.
A Playwright
Pageenhanced with Stagehand AI methods.Wraps a Playwright
Pageand anAsyncSession, proxying all standard Playwright methods transparently while addingact(),extract(),observe(), andexecute()AI operations bound to the current page.