[py] removed redundant attributes capabilities and set_capability in wpewebkit/options.py#12169
Merged
diemol merged 60 commits intoSeleniumHQ:trunkfrom Jun 8, 2023
sandeepsuryaprasad:trunk
Merged
[py] removed redundant attributes capabilities and set_capability in wpewebkit/options.py#12169diemol merged 60 commits intoSeleniumHQ:trunkfrom sandeepsuryaprasad:trunk
capabilities and set_capability in wpewebkit/options.py#12169diemol merged 60 commits intoSeleniumHQ:trunkfrom
sandeepsuryaprasad:trunk
Conversation
…into different lines
Codecov ReportPatch coverage has no change and project coverage change:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## trunk #12169 +/- ##
==========================================
+ Coverage 56.52% 56.56% +0.04%
==========================================
Files 86 86
Lines 5454 5450 -4
Branches 223 223
==========================================
Hits 3083 3083
+ Misses 2148 2144 -4
Partials 223 223
☔ View full report in Codecov by Sentry. |
diemol
requested changes
Jun 8, 2023
diemol
approved these changes
Jun 8, 2023
Member
diemol
left a comment
There was a problem hiding this comment.
Thank you, @sandeepsuryaprasad!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Removed redundant methods
capabilitiesandset_capabilityinwpewebkit/options.pySince
Optionsclass inwpewebkit/options.pyinherits fromArgOptions, I have removed redundant methods which sets and gets capabilities.Replaced
set_capabilitiesmethod with a setter method to add capabilities toself._caps.Motivation and Context
Since both methods
capabilitiesandset_capabilityare already implemented in parent classselenium.webdriver.common.options.ArgOptions, I found that same attributes are being implemented once again inwpewebkit/options.py.To get the capabilities from internal dictionary
self._capswe do have a getter method inselenium.webdriver.common.options.Optionsclass@propertydef capabilities(self):return _capsAnd the capabilities are being set through
set_capabilitiesmethod. For the purpose of consistency I haverepalced
set_capabilities()method inselenium.webdriver.common.options.Optionsclass to a setter method.@property.setterdef capabilities(self, values):name, value = valuesself._caps[name] = valueso now the capabilities can be set through setter,
self.capabilities=("pageLoadStrategy", "normal")Types of changes
Checklist