autoZoom
autoZoom(
fn,options?):Promise<void>
Defined in: autoZoom.ts:75
Zooms the camera in on interactions inside fn, panning to follow each
click and fill. After fn resolves the camera zooms back out.
Wrap page sections or forms — not individual clicks. One autoZoom per
distinct area of the UI gives the camera a natural rhythm.
Cannot be nested — calling autoZoom() inside another autoZoom() throws.
Parameters
Section titled “Parameters”() => void | Promise<void>
The interactions to zoom in on
options?
Section titled “options?”Optional zoom settings
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”await autoZoom( async () => { await page.locator('#name').fill('Jane Doe') await page.locator('button[type="submit"]').click() }, { duration: 400, easing: 'ease-in-out', amount: 0.4 })