Closed iampopovich closed 1 week ago
⏱️ Estimated effort to review [1-5] | 2 |
🧪 Relevant tests | No |
🔒 Security concerns | No |
⚡ Key issues to review |
Simplification and Refactoring: The PR simplifies the constructor by removing the `desired_capabilities` argument and refactoring the handling of `options`. Ensure that the new implementation correctly handles all scenarios previously covered by the combination of `options` and `desired_capabilities`. |
Category | Suggestion | Score |
Best practice |
Add exception handling to ensure the
___
**Ensure that the | 8 |
Possible issue |
Add validation for the
___
**Add a check to ensure that | 7 |
This does fix the problem described in the issue, but this class is problematic in several ways, still
It's hard to write this code when we can't have tests because we aren't managing the drivers.
But I think it needs to look more like: https://github.com/SeleniumHQ/selenium/blob/trunk/py/selenium/webdriver/wpewebkit/webdriver.py
But I think it needs to look more like
I'm trying to understand the differences between the classes if I make wpewebkit and webkitgtk identical. I removed parameters such as port, executable_path, and log path because there are default parameters in the Service class, and other driver binds similarly do not use them. However, in this case, the two classes become identical, and I'm not sure if I correctly understood what is required in the comment above.
classes in the latest commit
classes after I applied changes described above
It makes sense to me that they are identical if they aren't actually doing anything other than starting/stopping the driver.
@iampopovich the python linter is failing on some of these changes, can you take a look?
@titusfortner Running the script format.sh
did not make any corrections, but during the linting stage, isort
showed an error. It might be a good idea to add the isort
run to the format.sh
script.
From root run ./go py:lint
The format script is supposed to work without any additional software installed, but we haven't gotten that figured out for python. If we add the python bit, everyone who doesn't have a python dev environment will get failures. There's an open PR for part of it, we need to dig into it again.
User description
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.
according to #14087 i removed capabilities and add default Options same as in safari.webdriver class
Description
Motivation and Context
Types of changes
Checklist
PR Type
Bug fix
Description
desired_capabilities
argument from theWebDriver
constructor inwebkitgtk
module.options
directly, simplifying the initialization process.desired_capabilities
withoptions
capabilities.Changes walkthrough 📝
webdriver.py
Remove
desired_capabilities
argument and simplify WebDriverinitialization.
py/selenium/webdriver/webkitgtk/webdriver.py
desired_capabilities
argument from theWebDriver
constructor.options
directly.logic.