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
folderPath = “C:\Path\toyourfolder”
filePaths = Directory.GetFiles(folderPath)
Use a “For Each” activity
Upload the file
Hope it helps!!
Hi,
-
Open Browser
- Url: [URL of the web application]
-
Attach Browser
- Indicate the browser window containing the web application.
-
Click
- Indicate the file upload button or link on the web page.
-
Type Into
- Text: [Path of the first file]
- SimulateType: True
-
Send Hotkey
- Key: enter
-
(Repeat steps 4 and 5 for each additional file)
-
Click (Upload button)
- Indicate the upload button on the web page.
-
(Optional) Add more activities to handle any subsequent steps or validations.
Thanks
Try uploading the zip file if it’s ok using compress/zip files activity.
or
Do as same as @raja.arslankhan suggested.