SeleniumHQ / selenium-ide

Open Source record and playback test automation for the web.
https://selenium.dev/selenium-ide/
Apache License 2.0
2.8k stars 762 forks source link

Automatic file download to default location #1769

Closed edvinjunda closed 7 months ago

edvinjunda commented 8 months ago

💬 Questions and Help

Is there a way with Selenium IDE 4 to make that after clicking on download button on some website, files would be downloaded automatically to in some way defined location? Currently download prompt window pops up, with Selenium IDE 3 it was enough to just set automatic downloading in browser settings. I saw similar question on google group, but no answers provided there.

toddtarsi commented 8 months ago

@edvinjunda - Good question! There isn't anything currently, but I'd be happy to address it. It feels like I need to work backwards from how it works in selenium-webdriver, and make the IDE comply with that closely as possible. Electron has a good mechanism for this:

https://www.electronjs.org/docs/latest/api/download-item

The question just becomes how to make it work like this tutorial in the IDE as well:

https://www.lambdatest.com/blog/download-files-using-javascript-selenium/

For now, perhaps I'll make it download using whatever default path without showing a save dialog. That should be good for now I think.

edvinjunda commented 8 months ago

@toddtarsi yea for now it would be enough if files are just downloaded to downloads folder.

edvinjunda commented 8 months ago

Forgot to add, I think in future default download location could be specified in project config settings.

toddtarsi commented 7 months ago

@edvinjunda - Sounds good, just saw this but I agree.

toddtarsi commented 7 months ago

@edvinjunda - Not thoroughly tested, but should be part of 98

edvinjunda commented 7 months ago

It seems to work, I tried to download files today and they were downloaded.

toddtarsi commented 7 months ago

Woohoo! We'll configure it more soon. Feel free to make another issue if you need to configure stuff in some way!

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.