I am new to robot framework.
I want to upload one file from my system in python modal pop up.
There is no input tag and hence choose file is not working.
I use autoit library but facing some other issue there. Some time it locates the path through autoit and sometime is doesnt.
Please guide is the there any way to use choose file for dropzone.
Usually there is an
input tag of
type="file". The trick is not to activate any button for the browser or operating system file locator dialog. If you are activating a “Drop files here” area, then you can still activate it with
Mouse Over and then use the
Choose File keyword. Using Dev Tools on Chrome will help to find the correct
I tried in many ways but its not working.
I used autoit library but it is giving an error with not valid file name.
Can you use Ctrl-F on Chrome’s dev tools, and search with
//input[@type='file'] when you are on that page, and before clicking any element that would call the file upload?
AFAIK, dropzone uses Drag’n’Drop events to get the file from local filesystem into dom before the actual upload is triggered and sadly there is no support for triggering those events via SeleniumLibrary at this time. However, adding support for that sort of feature is’t that hard. Working python code can be copied from https://stackoverflow.com/questions/43382447/python-with-selenium-drag-anda-drop-from-file-system-to-webdriver
Ps. This feature will land into SeleniumTestability soonish …
And the feature has been added/released to SeleniumTestability 1.1.0, keyword docs: https://rasjani.github.io/robotframework-seleniumtestability/index.html?tag=plugin#Drag%20And%20Drop