-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[wip][py] Expose browser specific functionalities for remote webdrivers #11500
base: trunk
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #11500 +/- ##
==========================================
- Coverage 54.54% 54.51% -0.03%
==========================================
Files 85 85
Lines 5627 5631 +4
Branches 243 243
==========================================
+ Hits 3069 3070 +1
- Misses 2315 2318 +3
Partials 243 243 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
@j3soon are you still working on this? What is the status? |
@titusfortner, thanks for asking! I have finished implementing the functionalities in this PR (commit aff181f). The corresponding user API can be found in the However, I didn't have time to convert those examples to automated Selenium test cases, which is required in the contributing guideline. I would appreciate if someone could help convert those examples into Selenium test cases. Otherwise, I plan to write the test cases myself in the far future (maybe in 2024 or 2025). |
hah, yes, everyone is so busy at this point. Thanks for the update. We'll see what we can do for it. I'd definitely like to see this functionality added. |
I don't like this code, and would not want to merge it in. But the current situation does bother me a lot, and there's is one hack that tries to load an appropriate browser specific remoteConnection. But your PR seems to show that more work needs to be done (which is something I was always aware of, when I first encountered a subclassed WebElement in the form of FirefoxWebelement). |
Hi @isaulv , I acknowledge that this patch isn't ready to be merged yet, as indicated by the At the moment, the patch only serves as a proof-of-concept, showing that these features could be easily implemented using python-specific hacks, as discussed in issue #11483. If you've managed to come up with a better implementation, please feel free to replace the current one. It's worth noting that not merging this patch will not prevent the practical use of these functionalities. Users have the option to apply the python-specific hacks on their end, based on the remote driver documentation. This is one of the reasons why I haven't prioritized continuing to work on this patch. |
So, the underlying feature here, is that Java, Ruby & .NET all have ways to implement browser specific functionality in Remote Driver. https://docs.saucelabs.com/web-apps/automated-testing/selenium/selenium4/#network-conditions We need to figure out some way, some how to provide this functionality in Python, and I have no idea the right way to do that. I know David doesn't like the idea of mixins, which is what Ruby is doing. Java is doing pure magic, and .NET is kind of magic that you have to be explicit about. 😂 |
@j3soon I want to thank you for pointing out possible solutions. It's a big help for other users who need to handle this issue. I didn't mean to sound like a negative downer, I just want to have a solution that makes sense for a majority of Python programmers. @titusfortner I agree with David, that mixins are a bad idea. I would like an automatic solution since Python is dynamic enough for this to happen. I don't like mixins for many reasons, but the main argument is that multiple inheritance can add a lot of complexity to debugging. |
Hi @isaulv, thanks for rekindling this discussion. Studying the implementations in other languages before proceeding seems like a promising approach. If you came across any new insights or potentially better implementations, please share them with us. I'm looking forward to your findings and would be happy to learn how to implement this in the best way possible. :) |
Description
Motivation and Context
Implements #11483.
Types of changes
Checklist