fix: allow direct file input uploads

This commit is contained in:
Peter Steinberger
2026-01-01 09:44:29 +00:00
parent bf0bee58b3
commit 6ea10dd153
10 changed files with 116 additions and 10 deletions

View File

@@ -191,6 +191,7 @@ Actions:
Notes:
- `upload` and `dialog` are **arming** calls; run them before the click/press that triggers the chooser/dialog.
- `upload` can take a `ref` to auto-click after arming (useful for single-step file uploads).
- `upload` can also take `inputRef` (aria ref) or `element` (CSS selector) to set `<input type="file">` directly without waiting for a file chooser.
- The arm default timeout is **2 minutes** (clamped to max 2 minutes); pass `timeoutMs` if you need shorter.
- `snapshot` defaults to `ai`; `aria` returns an accessibility tree for debugging.
- `click`/`type` require `ref` from `snapshot --format ai`; use `evaluate` for rare CSS selector one-offs.