Skip to content

feat(#100, #111, #140, #304, #318, #364): new features#450

Open
giulio-leone wants to merge 1 commit intovercel-labs:mainfrom
giulio-leone:feat/new-features
Open

feat(#100, #111, #140, #304, #318, #364): new features#450
giulio-leone wants to merge 1 commit intovercel-labs:mainfrom
giulio-leone:feat/new-features

Conversation

@giulio-leone
Copy link

New Features

Batched PR combining six new feature issues into a single themed branch. Each feature is independent and additive.

Changes

#100 — Coordinate-based clicking (--x / --y)

Adds click --x <num> --y <num> for clicking at exact page coordinates. Useful for canvas elements, maps, or any scenario where a DOM selector isn't available. Coexists with existing click <selector> [--new-tab].

#111--body flag for network requests

Adds --body option to the network requests command so response bodies are included in the output. Off by default to avoid noise.

#140session close-all command

Adds a session close-all CLI subcommand to close all active browser sessions at once.

#304 — Screenshot scale option

Adds an optional --scale flag to the screenshot command, forwarding Playwright's scale option (e.g., css or device).

#318 — Iframe context isolation

After running the frame command to switch into an iframe, DOM operations now correctly scope to that frame:

  • getSnapshot(), getLocatorFromRef(), and getLocator() in browser.ts use getFrame() instead of getPage()
  • ~21 action handlers in actions.ts (evaluate, wait, scroll, content, getByRole, getByText, getByLabel, getByPlaceholder, storageGet/Set/Clear, styles, evalHandle, addScript, addStyle, getByAltText, getByTitle, getByTestId, waitForLoadState, setContent, waitForFunction) now call browser.getFrame()
  • getEnhancedSnapshot in snapshot.ts accepts Page | Frame

getFrame() returns the active frame if one is selected, otherwise falls back to page.mainFrame() — so behavior is unchanged when no frame is active.

#364first / last / nth modifiers for find locators

Adds positional modifiers to getByRole, getByText, getByLabel, getByPlaceholder, getByAltText, getByTitle, and getByTestId commands. Includes applyPosition() helper, safeCheck/safeUncheck with auto-fallback for hidden checkboxes, and isVisibilityError detection.

Testing

  • npx tsc --noEmit — passes
  • cargo check (CLI) — passes

Issues

Closes #100, closes #111, closes #140, closes #304, closes #318, closes #364

@vercel
Copy link
Contributor

vercel bot commented Feb 13, 2026

@g97iulio1609 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

…, vercel-labs#318, vercel-labs#364): new features

- vercel-labs#100: click --x --y for coordinate-based clicking
- vercel-labs#111: --body flag for network requests response bodies
- vercel-labs#140: session close-all command
- vercel-labs#304: scale option for screenshot
- vercel-labs#318: iframe context isolation — getFrame() for frame-scoped ops
- vercel-labs#364: first/last/nth modifiers for find locators
@giulio-leone
Copy link
Author

Re: body tracking upgrade concern — already handled in startRequestTracking() (lines 347-359). When called with includeBody=true after prior tracking without body, it upgrades: removes old response listener, creates new one with body capture. The isTrackingBodies flag prevents redundant upgrades.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant