There is a web portal with this behavior: In order to upload a file you need to drop it on “Drop file here” element, or, as a second option - to initiate standard file location dialog by clicking on the same element.
Since I need both Windows and Linux compatibility for the automation script - I can’t really use the “dialog” option but Drop file only option.
I tried to use Drag And Drop function, but it expects an object as a droppable item and not a file path.
The data I have is:
1. An object to drop into, it has events related to click, drop and others
2. A file path which I would like to transfer to the object without use of File dialog
Could you suggest a way to implement it?
take this as an crazy idea:
1. open window with url file:///Users/me/path/to/file/ (or inject iframe with folder to page)
(this is part i’m not sure about)
2. start drag action in window with file (pointer on target, mouse down)
3. switch to target window
4. drop file (pointer on target, mouse up)
as i said, not tested, probably (definitely) there are some obstacles
could you please paste script
would be easier than for rookies like me
hello, Tried but unfortunately it is impossible to perform drag and drop action, files are invisible once trying to put them on web.