The common problem in Selenium is typing a text into the input element (type="file"). This action cannot be done using JavaScript due to security reasons.
Normally (with other input, or with a file input but using Selenium IDE) this would be:
driver.find_element_by_id("inputFileId").send_keys("/tmp/tmp.txt")
But this doesn't work at all.
Some solution I found are:
- Use *chrome environment type rather than *firefox or *iexplore.
- Set your
singed.applets.codebase_principal_supporttotruein your Mozilla configuration.
None of them worked for me.
Is there any way to avoid this security restriction on Firefox in order to be able to run these tests?