I have a slightly weird file upload user flow in an application I am testing which causes the file upload dialogue to remain open when testing with selenium-webdriver, via capybara.
The flow is this:
- User is presented with a choice of 3 buttons (to specify type of file to be uploaded)
- Selecting any of these immediately triggers file upload to be shown (via js)
- Choosing file inserts the filename in a hidden field and submits form to the server
The problem is this: I can click the button for step 1, and attach the file for step 3, and all continues as usual. But the system file open dialogue remains open due to step 2, and these accumulate if I'm running several scenarios on the same piece of functionality.
So, although this doesn't break anything, it is obviously a bit untidy potentially having several file upload dialogues persisting through the entire test suite.