Upload multiple file in one time in web

Hi Team
I want to upload all file in folder in one time in web. Please let me know any way.
Thanks .

@AsadPathan2665
→ Save all files in folder and keep that folder path in variable.
→ click on web page button to attach file.
→ It will open file explorer popup to type file name.
→ here type folder path which is save in variable+Enter
→ use send hot key and select all files and click on file explorer ok button.
It will upload all selected files in one short

2nd method:
->Use Directory.getfiles(Folderpath) method
->And get all files in string array and use loop
->Inside loop use click button, type into in file explorer and click on ok.
->By this you will attach one by one.

Note: 2nd method is not reliable try first one

1 Like

Hi @AsadPathan2665

folderPath = “C:\Path\toyourfolder”
filePaths = Directory.GetFiles(folderPath)
Use a “For Each” activity
Upload the file

Hope it helps!!

1 Like

@AsadPathan2665

Hi,

  1. Open Browser

    • Url: [URL of the web application]
  2. Attach Browser

    • Indicate the browser window containing the web application.
  3. Click

    • Indicate the file upload button or link on the web page.
  4. Type Into

    • Text: [Path of the first file]
    • SimulateType: True
  5. Send Hotkey

    • Key: enter
  6. (Repeat steps 4 and 5 for each additional file)

  7. Click (Upload button)

    • Indicate the upload button on the web page.
  8. (Optional) Add more activities to handle any subsequent steps or validations.

Thanks

Hi @AsadPathan2665

Try uploading the zip file if it’s ok using compress/zip files activity.
or
Do as same as @raja.arslankhan suggested.

1 Like