robotframework-browser icon indicating copy to clipboard operation
robotframework-browser copied to clipboard

Upload Files

Open martamedovova-ext91522 opened this issue 2 years ago • 12 comments

Hello,

how can I upload 2 files in one step with Browser Library?

Can you update KW Update File for Update Files or create new :-)???

martamedovova-ext91522 avatar Dec 04 '23 10:12 martamedovova-ext91522

You mean Upload File By Selector keyword? In any case, it uses setInputFiles behind the scenes. The Playwright side setInputFiles supports multiple files and your need can be done. Can you do the PR too?

aaltat avatar Dec 04 '23 10:12 aaltat

@allcontributors please add @martamedovova-ext91522 for ideas?

aaltat avatar Dec 04 '23 10:12 aaltat

@aaltat

I've put up a pull request to add @martamedovova-ext91522! :tada:

allcontributors[bot] avatar Dec 04 '23 10:12 allcontributors[bot]

Yes, I meant Upload File By Selector, would need Upload Files by Selector :) Will you create this KW then? :-)

martamedovova-ext91522 avatar Dec 04 '23 10:12 martamedovova-ext91522

Anyone who has similar interests, can do a pull request and make the necessary changes. It’s not guaranteed that change will be implemented or when that might happen. If you are in a rush, doing that by yourself is the most fastest way.

aaltat avatar Dec 04 '23 11:12 aaltat

I would not want to do a new keyword actually. I would just allow the file path to be a list or a dictionary or list of dictionary.

This is basically same as Playwright allows it.

files: string|Array<string>|Object|Array<Object>
    name: string
    mimeType: string
    buffer: Buffer

I think we can probably not do Buffer, but lets analyse first. So if we do not support Buffer, we do not need dictionaries. But that could be relevant for remote executions.

Or is anyone strongly thinking that a new keyword is a must.

Snooz82 avatar Dec 07 '23 12:12 Snooz82

I am not in favor of new keyword, enhancing existing keyword to support multiple files is better way.

aaltat avatar Dec 07 '23 12:12 aaltat

I do not need the new KW but at least need have this function at the current kw?

martamedovova-ext91522 avatar Dec 07 '23 14:12 martamedovova-ext91522

No idea about buffer, but if it is complicated, I would skip it. Unless there is strong need for it.

aaltat avatar Dec 07 '23 14:12 aaltat

I would say I will be needed very soon.

martamedovova-ext91522 avatar Feb 02 '24 07:02 martamedovova-ext91522

@martamedovova-ext91522 What do you need very soon? @aaltat was talking about the Buffer. I doubt we can do Buffer.

Do you need directory or multiple files soon? RoboCon in Helsinki is next week and also RoboCon Online is end of February. So it might be tricky to find time.

Snooz82 avatar Feb 02 '24 08:02 Snooz82

Sorry I meant the uploading multiple files on the same time. Sure, I am aware about the RoboCon. I just say it would be helpfull feature :)

martamedovova-ext91522 avatar Feb 02 '24 08:02 martamedovova-ext91522

Hello, any update on this one :)? I also need to uplaod multiple files at once.

ivana-lazic-lu avatar Oct 17 '24 10:10 ivana-lazic-lu

We are going to change the argument syntax slightly. Instead of path being named argument, we are going to change it to variable number of arguments. Therefore marking this backwards incompatible.

aaltat avatar Oct 19 '24 22:10 aaltat

Also added support folder. If path is a folder, will find files from the folder (but not from sub-folders) and upload files from the folder. It is possible to mix and match files and folders.

aaltat avatar Oct 19 '24 22:10 aaltat

Moved to different idea with arguments and not anymore backwards incompatible.

Adding support for buffer.

aaltat avatar Oct 21 '24 17:10 aaltat