Skip to content

[🐛 Bug]: [py] Downloading files doesn't work for local drivers #15753

Closed
@cgoldberg

Description

@cgoldberg

Description

In the Python bindings, there are 2 methods available on all webdriver instances:

  • get_downloadable_files
  • download_file

They are used to retrieve files that were downloaded remotely in a Selenium Grid.
However, these only work on Remote webdriver, and fail on local drivers with:

selenium.common.exceptions.WebDriverException: Message: You must enable downloads in order to work with downloadable files.

This occurs oven when adding options.enable_downloads = True

Since these are "Remote-only", the methods should not be available in local webdrivers. In subclasses of WebDriver, they should probably just raise NotImplementedError when called.

Reproducible Code

options = webdriver.ChromeOptions()
options.enable_downloads = True
driver = webdriver.Chrome(options=options)
driver.get_downloadable_files()

Debugging Logs

N/A

Metadata

Metadata

Assignees

Labels

C-pyPython BindingsI-defectSomething is not working as intendedOS-linux

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions