Uploading all images from folder

  • How do I select all images from the folder to upload, instead of one?
    It only selects one image, and I want the bot to select all of them, so I could upload all images at once.

  • Any ideas anyone? Can't find anything online :/

  • Use resources.
    Define a resource "Files from directory" and select your
    folder with images. That would create a list variable with
    filenames and filepaths of all images found in folder.

    After that simply use loop to go through that list and
    upload all images where you want.

  • @GaG
    Thanks, but that won't work.
    I need the upload process to imitated ctr+a combination when selecting pictures from a folder.

    The website I try to automate has one button to upload and it disappears after selecting the image, but if you select all images it will upload all of them.

  • Then just use appropriate action to simulate
    keys pressed. Just use "Type" action.

  • @GaG
    Can you elaborate on that?
    I tried the method you mentioned before and like I said it's not working. Only the last image of the loop gets uploaded.
    alt text

    How do I use the "Type" action?

  • You dont need loop action, I guess.
    When you open site and click on button that
    opens select files dialog, simply use "type" action
    to select all files.

  • @GaG
    Thanks so much for trying to help me!!! I tried the "type" action. It's not working :/
    I think type action only works with browser input fields, that's why "open file result" is required just before opening the file upload selection window.

  • Hmm, yeah you need "Open File Result" action actually.
    Just read what that action says in description and you
    should be able to upload all files at once >>>

    " Uploading file is performed in two steps: setting next open file dialog result with this action and clicking on element which triggers file upload, like "Upload" button.
    You must always call this action before starting upload, otherwise BAS won't know which file it need to send to browser.
    Use resource with type FilesFromDirectory to upload all files from folder and distribute them across threads."

  • @GaG
    Thanks again for your help, but I finally solve the problem using a loop and a list.
    Just by mistake, I found this thread: https://community.bablosoft.com/topic/11372/bulk-image-upload
    And it helped!
    I was searching for few days and found this only now lol.

Log in to reply