robotframework-browser
robotframework-browser copied to clipboard
Upload Files
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 :-)???
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?
@allcontributors please add @martamedovova-ext91522 for ideas?
Yes, I meant Upload File By Selector, would need Upload Files by Selector :) Will you create this KW then? :-)
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.
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.
I am not in favor of new keyword, enhancing existing keyword to support multiple files is better way.
I do not need the new KW but at least need have this function at the current kw?
No idea about buffer, but if it is complicated, I would skip it. Unless there is strong need for it.
I would say I will be needed very soon.
@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.
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 :)
Hello, any update on this one :)? I also need to uplaod multiple files at once.
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.
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.
Moved to different idea with arguments and not anymore backwards incompatible.
Adding support for buffer.