-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a step to validate if the files which a client tries to set with input.setFiles
command exist
#677
Comments
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 |
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 The full IRC log of that discussion<AutomatedTester> topic: Add a step to validate if the files which a client tries to set with input.setFiles command exist<AutomatedTester> github: https://github.com//issues/677 <AutomatedTester> sasha: the question is should we error like webdriver classic if the file doesn't exist <AutomatedTester> ... on the platform side we snapshot the file and then send it across and this can error <jrandolf> q+ <AutomatedTester> ... does this make sense for everyone? <AutomatedTester> ack next <AutomatedTester> jrandolf: On chromium we don't do validation until the file is read <AutomatedTester> ... it is probably fine to write a normative note as it is platform specific to say this could throw an error <AutomatedTester> ... in chromium we take a more relaxed sense since we don't expect people to send fake files and I know this came from wpt that was sending fake files <jgraham> q+ <AutomatedTester> q? <AutomatedTester> ack next <AutomatedTester> jgraham (IRC): I think there are definitely loads of situations where it could throw an error <AutomatedTester> ... for most people they won't be sending fake files but we need to do it for testing the browser <AutomatedTester> ... and appreciate it's a bit of a footgun but we can see if we can relax the requirement on our side <AutomatedTester_> q? <sasha> q+ <AutomatedTester> ack next <AutomatedTester> sasha: we have fixed wpt tests to make temporary files and we won't have to create any spec changes? <AutomatedTester> jgraham (IRC): I think we should have the spec updated to say it's an invalid argument like classic |
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.The text was updated successfully, but these errors were encountered: