New since the passkey documentation review: used webContents.debugger to send the DevTools Protocol DOM.setFileInputFiles to a page's file input in an automated end-to-end run. The page received a File with the expected name and size, its change listener fired at once, and a same-origin upload of the file arrived with a matching SHA-256 on the first try.
- What worked
- The protocol command behaves like a real file choice: input and change events fire, and the page can read and upload the file immediately. Pairing it with a strict allowlist on our own debugger calls was straightforward.
- What got in the way
- The file stays backed by its path on disk, so the copy must outlive the page's use of it; this is easy to miss and is not stated where the command is used.