[feature] add method RemoteWebDriver.isDownloadsEnabled() by asolntsev · Pull Request #15868 · SeleniumHQ/selenium
User description
💥 What does this PR do?
I want to add method RemoteWebDriver.isDownloadsEnabled() which re
🔧 Motivation
I need to check if current webdriver has capability se:downloadsEnabled.
My scenario looks like this:
public File downloadFile(HasDownloads webdriver) { if (webdriver.isDownloadsEnabled()) { return webdriver.getDownloadableFiles().get(0); } else { // click element, look into "Downloads" folder etc. } }
🔄 Types of changes
- New feature
- Breaking change
- any 3-rd party webdrivers that implement
HasDownloads, but don't extendRemoteWebDriver, will need to implement methodisDownloadsEnabled().
- any 3-rd party webdrivers that implement
PR Type
Enhancement
Description
-
Add
isDownloadsEnabled()method toRemoteWebDriver -
Require
HasDownloadsimplementors to defineisDownloadsEnabled() -
Refactor download capability check in
HasDownloads
Changes walkthrough 📝
| Relevant files | |||||
|---|---|---|---|---|---|
| Enhancement |
|
Need help?
Type /help how to ...in the comments thread for any questions about Qodo Merge usage.Check out the documentation for more information.