Great post! Thanks for sharing! I ran into the same issue on a work project and noticed something interesting: we had a folder named test at the project root. When I experimented with other folder names like lib, app, etc. as values to fill the form field, I got the same error message. Then, when I tried actual filenames like Rakefile or README, I wouldn't get the error, but the field would be filled with the path to that file (or a temporary copy of it). So, it turns out that if the string you use to fill the input field matches the path to any file or folder in your project directory, Selenium WebDriver will try to upload that file/folder as if it was a file input, regardless of the actual input type. It's seems a bit less like a Selenium bug, but rather an overly aggressive file detection feature that checks if form values correspond to existing filesystem paths.