Upload file using Robotic Process Automation

am not able to upload file using the Chrome browser. I have tried it for one document and using below code for upload it.

Choose File    //span[contains(text(),'Browse...')]    ${CURDIR}\\Documents\\A1-App-BC.tif

I tried with full path of the file also. but not working. Please help me on this.

Actually I have to load 21 documents at a time and test those using RPA.

Hi Peeru,

Welcome to RF forum!

Could you give us a bit more context:

  • what is the library you use the Choose File keyword from
  • is there an error stack trace?

moved topic to #libraries:lib-seleniumlibrary


Could you maybe show the pages code?

i think this does not work just with a span element.
But @aaltat knows better what kind of elements can be used with Choose File

Underlying Selenium only supports input type elements. Therefore one should point to the locator to correct element. If your page does not contain input element, you need to talk to your developers, most likely proper solution requires executing JavaScript.

Am uploading couples documents manually. The same trying with RPA framework.

I m sharing you the code in below. Choose File is not working and saying that element is not intractable exception.

Click Element    //div[contains(text(),'Scan - Unit 111 Dillingham')]
Wait Until Element Is Visible    //span[contains(text(),'Browse...')]    1 min
Click Element    //span[contains(text(), 'Browse...')]
Log To Console    testttttttttttttttttttt
Sleep    20
Log To Console    before choosefile - ${CURDIR}\\sample.tif
Choose File    //span[contains(text(), 'Browse...')]    ${CURDIR}\\sample.tif

Wrote python custom method for file upload and using it in robot framework But that is also not supporting for me…

Python code Sharing in below. Upload File is my custom method in Python. am not able to load that .py file. I mean am in RIDE am writing script since Eclipse almost all versions have conflit with Robot Framework and Python. Not sure what exactly issue is but we see RPC XML request error always. So we switched to RIDE tool to write the RF.


Upload File //span[contains(text(), ‘Browse…’)] {CURDIR}/sample.tif \n {CURDIR}/A1-AppDoc.tif

please help me on it. how can upload multiple files using Robot Framework. Appreciate earlier help. :slight_smile:

Thanks for the reply. I think I understand more about it.
Right, there is no ‘input’ element. this is inbuilt IBM ECM product component that built on DOJO framework and necessary supporting technologies. Nothing is there to change that UI now. Now you can see the Browse element for reference attached screenshot.

Alternatively I have tried with ‘AutoIT’ using .exe (inside I gave the full path of the file) but it loading single file. But I want load couple of files at a time

snippet attached for reference.
Run AutoIt Script C:/Ride_Workspace/KOLEA_AUTOMATION/autoupload/auto5.exe

mentioned path is referring the exe file which has file path. But not sure how to pass multiple files path.

Please help me asap and thanks for the spontaneous reply.

Input element is present in that, but that is highlighting the ‘icon’ which is not clickable anymore.
Uploaded the screenshot for reference. I use Browse button upload manually.

It does not have to be clickable, because element is not clicked, it just needs to take in the string send by Choose File keyword. But if that does not work then you need to talk your development and ask a solution.

thanks for the update.