Locate a "frame" to upload file

Hi,

On selected screen you can find “attach logo” button which I selecting.
then is “windows” where I need to select file.
Unfortunately I can not find way to locate “File Name:” box to input path.

I have no idea how to find this new frame as it is not displayed in code. I’m using browser library and know which keyword to use, even tried to do that with python-playwright.
Still do not know how to find the way to locate this window.

Someone can help ?

Regard
Piotr

Hi Piotr,

You will need to dig around the form in the html to find the file input field, it looks like it’s a hidden field. I would guess that it’s somewhere between the button and the image preview but it may also be between the contact info field and the button too.

There is a possibility that there is no file field and it’s being uploaded with pure javascript (this is rare but I have seen it), if this is the case you’ll need to find callback the function that is called when a file is selected and use Execute JavaScript

If you are having trouble finding the file input field ask your dev team where it is, they should be able to show you (or if it’s a publicly available site we could have a look for you)

Dave.

Screenshot looks like its not a browser window but a native file selector dialog. I have not used playwright or browser library but i doubt that neither has support for interacting with “native” UI’s so, something like AutoIT or other windows speciic tools are required.

If your web app accepts “dragging and dropping” the file into the page itself, SeleniumTestability does have some code to handle this sort of case in “pure javascript”, however, since its intended for selenium specifically, you might need to adapt the code:

You might use https://marketsquare.github.io/robotframework-browser/Browser.html#Upload%20File%20By%20Selector

To bypass the native dialog

I was trying this from very begging but all the time I’m getting “waiting for selector”
Probably problem is here but I have not idea how to create proper one selector.
Maybe you can help.
Here is Screen from AutoIT with I believe all necessary information to do that


I move mouse to show information from place were normally you can type name of file

The upload method will never open the native dialog. Instead it will response to the web page with the selected file.

You need to target with the selector the input element with the type file on the web page.