Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple file upload #566

Open
cysiegel opened this issue Aug 25, 2020 · 2 comments
Open

multiple file upload #566

cysiegel opened this issue Aug 25, 2020 · 2 comments

Comments

@cysiegel
Copy link

cysiegel commented Aug 25, 2020

Thank you again for this great library

Currently the attach_file/3 only allows the uploading of one file at a time
Is it possible to add the ability to upload multiple files at once

Thanks

@michallepicki
Copy link
Contributor

michallepicki commented Aug 28, 2020

Hi! Which backend (chromedriver, selenium) are you using? And if you're using selenium, which browser?

Based on this stackoverflow question, and current wallaby attach_file/3 implementation, I think you might be able to attach multiple files this way for Chrome:

session
|> set_value(file_input_query, Enum.join([absolute_path1, absolute_path2], " \n "))

@alexandreguz
Copy link

There is actually a bug in the attach_file function. The function receives a list of tuples with the path of the files to be uploaded. However, it is not possible to send a list with more than one item.

image

The michallepicki solution works.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants