-
- Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] removed redundant attributes capabilities and set_capability in wpewebkit/options.py #12169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @sandeepsuryaprasad!
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