Python Forum
Add path to a local file in pop-up field - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Add path to a local file in pop-up field (/thread-24317.html)



Add path to a local file in pop-up field - pythonscripting - Feb-08-2020

I am scripting in Selenium no problems on that.

At a certain point I click on browse (a http element) and a pop-up opens to upload a local file from hard disk drive.

So what I need is (I am outside Selenium here):

1) Insert a text in the active window. This will be the Path and the Name of the file to upload
2) Press <ENTER>

Can that be done? When I record with Selenium IDE add-on those 2 steps record nothing.
Of course, it is because I am outside the scope of Selenium.

If it is to any importance, I develop in Windows but will execute in Linux.
The solution should work in Linux as well.


RE: Add path to a local file in pop-up field - Larz60+ - Feb-08-2020

Please post code, it would help in understanding what you are trying to do.