[py] Raise NotImplementedError when deleting downloads in driver subclass by cgoldberg · Pull Request #16423 · SeleniumHQ/selenium
User description
💥 What does this PR do?
This PR adds methods that raise NotImplementedError if you try to call delete_downloadable_files() on a local driver instance. That method only works on Remote WebDriver. This is similar behavior to what is already done in get_downloadable_files().
🔄 Types of changes
- Bug fix (backwards compatible)
PR Type
Bug fix
Description
-
Add
delete_downloadable_files()method raisingNotImplementedErroracross all local driver classes -
Ensures consistent behavior with existing
get_downloadable_files()anddownload_file()methods -
Prevents calling remote-only functionality on local driver instances
Diagram Walkthrough
flowchart LR
A["Local Driver Classes"] --> B["Add delete_downloadable_files()"]
B --> C["Raise NotImplementedError"]
C --> D["Consistent with Remote-Only Methods"]
File Walkthrough
| Relevant files | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Bug fix |
|