Skip to content

Mention HTML unit in file downloads section #533

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

Closed
skyhirider opened this issue Oct 11, 2020 · 3 comments
Closed

Mention HTML unit in file downloads section #533

skyhirider opened this issue Oct 11, 2020 · 3 comments

Comments

@skyhirider
Copy link
Contributor

skyhirider commented Oct 11, 2020

🚀 Feature Proposal for the site or the documentation

https://www.selenium.dev/documentation/en/worst_practices/file_downloads/

HTMLunit has a mature interface for file downloads ( see https://htmlunit.sourceforge.io/apidocs/com/gargoylesoftware/htmlunit/attachment/AttachmentHandler.html )

It could be mentioned as many are looking to use Selenium for web scraping and file downloads and copying a link is not always possible, especially with more complex JavaScript sites.

Not sure if there is a better way to handle file downloads via Selenium currently that to use HTMLunit, it's driver and native input streams

Motivation

Took me quite a bit of time to figure out how to download files. Having at least a mention in the official docs would probably hell others save time.

Example

HtmlUnit and its driver can be used to intercept files as input streams and add custom logic that will handle and save them.

See https://github.com/SeleniumHQ/htmlunit-driver and https://github.com/HtmlUnit/htmlunit/blob/master/src/main/java/com/gargoylesoftware/htmlunit/attachment/AttachmentHandler.java

@ghost ghost added the needs-triaging label Oct 11, 2020
@diemol
Copy link
Member

diemol commented Oct 12, 2020

@skyhirider, would you like to send us a pull request with that suggestion?

@skyhirider
Copy link
Contributor Author

@diemol I can, but saw there are several language files in the repo.

Presume English is good enough?

Any guidelines on what to write and how?

skyhirider added a commit to skyhirider/seleniumhq.github.io that referenced this issue Oct 13, 2020
described attachment download option via HtmlUnit
@skyhirider skyhirider mentioned this issue Oct 13, 2020
6 tasks
@diemol
Copy link
Member

diemol commented Oct 13, 2020

@skyhirider please for all languages, check step 3 of this contribution guide
https://www.selenium.dev/documentation/en/contributing/
You can add the text in English and add a notification asking for translations.

diemol added a commit that referenced this issue Nov 8, 2020
* closes #533

described attachment download option via HtmlUnit

* added untranslated text to all other languages

* Update docs_source_files/content/worst_practices/file_downloads.es.md

* Update docs_source_files/content/worst_practices/file_downloads.fr.md

* Update docs_source_files/content/worst_practices/file_downloads.ja.md

* Update docs_source_files/content/worst_practices/file_downloads.ko.md

* Update docs_source_files/content/worst_practices/file_downloads.nl.md

* Update docs_source_files/content/worst_practices/file_downloads.zh-cn.md

Co-authored-by: Diego Molina <[email protected]>
selenium-ci added a commit that referenced this issue Nov 8, 2020
* closes #533

described attachment download option via HtmlUnit

* added untranslated text to all other languages

* Update docs_source_files/content/worst_practices/file_downloads.es.md

* Update docs_source_files/content/worst_practices/file_downloads.fr.md

* Update docs_source_files/content/worst_practices/file_downloads.ja.md

* Update docs_source_files/content/worst_practices/file_downloads.ko.md

* Update docs_source_files/content/worst_practices/file_downloads.nl.md

* Update docs_source_files/content/worst_practices/file_downloads.zh-cn.md

Co-authored-by: Diego Molina <[email protected]> caead29
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants