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

Fix basic file upload functionality -> ElementHandle#set_input_files #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

randall-coding
Copy link

Why?

Changes made to address this issue #24

I also ran into a second issue half way through. The video file I was trying to upload would only partially upload and then stop.

How?

I fixed the first issue by modifying the File struct in utils.rs to call mime mimeType which, although breaking Rust naming conventions, ensures the driver is receiving the attribute name in the form it expects.

After fixing that, I found the upload was still not working correctly unto completion (specifically trying a file upload on Bitchute). To fix this issue I updated the playwright driver version. Current version is 1.11.0, which was upgraded to 1.12.2 to solve that issue. Trying to upgrade to higher versions (I tried 1.16 and 1.19) breaks the code because no "objects" are returned to the Context struct from the driver process stdout.

Tests

No tests were added and I did not fix the file_chooser test.

Before you test out the code yourself it is important to to delete the previous driver folder which is located at ~/.cache/ms-playwright/playwright-rust/driver , at least on Linux machines.

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

Successfully merging this pull request may close these issues.

None yet

1 participant