I often came across a problem how to upload files in IE. Unlike Chrome Firefox, you cannot just specify the desired folder, and all files will be downloaded to this folder. You also need to interact with native Windows formats, etc.
There are several options, for example, using AutoIt, using keyboard commands, a robot, etc. But all these parameters are unstable, they require an explicit wait, the use of redundant libraries and unsuitability when running tests in parallel. Another problem is what to do if the file is not loaded with a direct link, but the link is generated from the javascript command or received from the server and cannot be extracted from html.
All these problems can be solved, here in the hte answer I will show how to do it. The solution is written in C #, I believe that the same thing can be implemented in java
source share