Skip to content

Add coordinate click and file upload actions#3115

Open
jinxjinxagain wants to merge 4 commits into
jo-inc:masterfrom
jinxjinxagain:feature/camofox-coordinate-click
Open

Add coordinate click and file upload actions#3115
jinxjinxagain wants to merge 4 commits into
jo-inc:masterfrom
jinxjinxagain:feature/camofox-coordinate-click

Conversation

@jinxjinxagain
Copy link
Copy Markdown

@jinxjinxagain jinxjinxagain commented May 13, 2026

Summary

Adds two browser interaction capabilities to the HTTP API:

  • coordinate-based click support for POST /tabs/:tabId/click
  • file upload support through a new POST /tabs/:tabId/upload endpoint

Details

Coordinate click

POST /tabs/:tabId/click now accepts a coordinates object in addition to the existing ref and selector inputs:

{
  "userId": "user-1",
  "coordinates": { "x": 320, "y": 240 }
}

The server validates the coordinate values and dispatches a mouse move/down/up sequence at the requested point. Existing ref and selector click behavior is preserved.

File upload

Adds POST /tabs/:tabId/upload for setting local files on a file input or triggering a file chooser. The endpoint supports:

  • filePath for a single local file
  • files for multiple local files
  • ref, selector, or coordinates to target the file input / upload control

Example:

{
  "userId": "user-1",
  "filePath": "/tmp/avatar.png",
  "selector": "input[type=file]"
}

If the target element is an input[type=file], the endpoint uses setInputFiles. Otherwise it waits for a file chooser after clicking the target and then sets the selected files.

API docs

The new upload endpoint is documented in the generated OpenAPI spec.

Validation

  • npm test -- --runTestsByPath tests/unit/openapi.test.js

@jinxjinxagain jinxjinxagain changed the title Add coordinate click and file upload actions WIP: Add coordinate click and file upload actions May 13, 2026
@jinxjinxagain jinxjinxagain marked this pull request as draft May 13, 2026 11:26
@jinxjinxagain jinxjinxagain marked this pull request as ready for review May 13, 2026 11:27
@jinxjinxagain jinxjinxagain changed the title WIP: Add coordinate click and file upload actions Add coordinate click and file upload actions May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant