BrowserContext
and the Page
it’s currently on via agent.context
and agent.page
.
This can be useful when you need some lower-level browser interactions - for example manipulating cookies, listening to network traffic, or emulating specific keystrokes.
Example
agent.page
will always refer to the agent’s active tab.
See Playwright’s docs for Page and BrowserContext for details.