Back to Docs
Advanced

upload

Upload a file to a file input element using DOM.setFileInputFiles.

Usage

$ cdpilot upload <selector> <file-path>

Arguments

NameRequiredDescription
selectorrequiredCSS selector of the file input
file-pathrequiredPath to the file to upload

Examples

Upload a file to a file input

$ npx cdpilot upload "input[type=file]" ./photo.jpg