Closed lutien closed 5 months ago
The file can also be deleted before it is actually used but after it is set via automation but before it is used. I think allowing to test scenarios when the file does not exist at upload time is also interesting, so perhaps an optional validation?
Isn't this a distinct scenario? When discussing input.setFiles
, the primary focus is on file selection. In this context, each browser exclusively permits users to choose existing files through the file selection dialog. Selecting a non-existent file is not an option at this stage.
The HTML spec says that "Files can be from the filesystem or created on the fly, e.g., a picture taken from a camera connected to the user's device" and it does not look like there is a requirement that the file has to exist on the filesystem.
The Browser Testing and Tools Working Group just discussed Add a step to validate if the files which a client tries to set with input.setFiles command exist
.
Similar to WebDriver Classic actions (see here point 8.5), for
input.setFiles
command we could add a step to validate if paths specified infiles
argument point to existing files.