← Back to DOM domain

DOM.setFileInputFiles

Sets files for the given file input element.

Domain: DOM stable

Parameters

NameTypeDescription
filesarrayArray of file paths to set.
nodeId (optional)NodeIdIdentifier of the node.
backendNodeId (optional)BackendNodeIdIdentifier of the backend node.
objectId (optional)Runtime.RemoteObjectIdJavaScript object id of the node wrapper.

Example Request

{
  "id": 1,
  "method": "DOM.setFileInputFiles",
  "params": {
    "files": []
  }
}

Example Response

{
  "id": 1,
  "result": {}
}

Usage in Node.js

const result = await send('DOM.setFileInputFiles', {"files": []});
console.log(result);