- Print
- DarkLight
I can't record file uploads/tests fail at file upload
Article Summary
Share feedback
Thanks for sharing your feedback!
To record or test file uploads, the input
element with the type
attribute set to file
must exist in the DOM tree under test (see note 1).
(Please refer to the reference articles below for information on how to record file uploads, input
elements, and DOM trees.)
Below are possible reasons why you cannot record file uploads or why the test fails even if it's recorded correctly.
Causes and solutions
Issue | Possible cause | Solution |
---|---|---|
The test fails. (Recording is possible.) | The position of the input element, etc., has changed due to an update of the target page/application, so the matching element cannot be found during test execution. | Re-recording may solve the issue. |
Recording fails. (the test cannot be run either) | The input element cannot be found because it has not been added to the page's DOM tree. | Autify does not support this. Please add an input element to the DOM tree to record/run tests. |
Recording and test execution are unstable. (Sometimes it passes, sometimes it fails) | The input element is generated dynamically or added to the DOM tree only during file upload operations, so it can only be found at specific times. | You may be able to solve this by adding a step that triggers the event necessary for the input element to be generated or added. For example, add a "Click 'Upload File' button" step. |
Note
- As long as the input element is added to the DOM tree, you can make it invisible through style settings.
Reference articles
- Details on <input type="file"> (jumps to MDN Web Docs)
- Introduction to the DOM (jumps to MDN Web Docs)
If the above does not solve your problem, please get in touch with us via Autify chat.
Was this article helpful?