Is there any way to usefully test an Uploadify file upload with Selenium? I'm using Capybara with Rails, but really, any solution with Selenium would be a starting place. I'm worried I may have to disable Uploadify for Selenium testing.
I was able to get this to work, by interacting with the JS directly. I added this to my test helper.
def upload_via_uploadify file_input_id, path
page.execute_script("$('##{file_input_id}').show()")
attach_file(file_input_id, path)
page.execute_script("$('##{file_input_id}').uploadifyUpload()")
end
You can't actually trigger a button click because of the flash, but besides that it works great and you can test the rest of the interaction goes as planned
Look at Flash-selenium project. But it uses JS so you possibly could do interactions with Flash by yourself using JS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With