Playwright
How to combine low-level browser operations with AI steps
Magnitude runs tests using Playwright. While agent.act()
and agent.check()
cover most test automation needs with natural language, direct access to Playwright’s page
and context
objects is available within test functions (async (agent) => { ... }
).
Use agent.page
and agent.context
strategically when these specific capabilities are needed, or as a fallback if the AI struggles with a complex interaction. Refer to the Playwright Access reference for basic API details.
Magnitude aims to expand the capabilities of the ai
agent over time to cover more scenarios natively. However, direct access to Playwright’s API ensures you always have the tools needed for any testing requirement in the meantime.
To configure the Playwright browser context, see browser options instead.
Example
By combining Magnitude’s AI-driven steps with direct Playwright access for these specific scenarios, you can create comprehensive and robust tests.