-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[py][bidi]: support accept_insecure_certs
and proxy
parameters in create_user_context
#15983
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
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
I know we already do it in a few places, but I'm not crazy about hitting external sites in the test suite (badssl.com, example.com, herokuapp.com). Can you think of any way we can test this locally? If it's too complex to setup, it's better to hit them than not test... but if we can come up with a way to avoid it, that would be best. |
@cgoldberg I think that will require adding custom test webpages to selenium in And since during the test run, the webserver serves pages via If the above issues could be solved, we can move to local only tests. Currently, I am facing one issue in the CI - the browser in the CI is auto upgrading So, any help with this is much appreciated! |
I'll try to think of some ideas for local testing... but yea, creating a site with a different domain and invalid cert just for testing is not trivial. I guess we can keep it in the test suite, and if it becomes an issue in terms of reliability, we can decide to disable them. |
Seems like only chrome is doing this, Edge browser test passes in the CI. This can be security rule from chrome as seen in some forums. I will see if something can be done to get it working in the CI else I will skip it for Chrome. |
User description
🔗 Related Issues
💥 What does this PR do?
Adds support for
accept_insecure_certs
andproxy
parameters increate_user_context
for Browser module - https://w3c.github.io/webdriver-bidi/#command-browser-createUserContext🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Add
accept_insecure_certs
andproxy
parameters to BiDicreate_user_context
Implement
to_bidi_dict()
method for proxy configuration conversionAdd comprehensive tests for new BiDi browser functionality
Changes diagram
Changes walkthrough 📝
browser.py
Enhanced create_user_context with proxy and cert options
py/selenium/webdriver/common/bidi/browser.py
accept_insecure_certs
andproxy
parameters tocreate_user_context
methodOptional
type andProxy
class for type annotationsproxy.py
Add BiDi format conversion for proxy settings
py/selenium/webdriver/common/proxy.py
to_bidi_dict()
method to convert proxy settings to BiDi formatnoProxy
from string to list format for BiDi compatibilitybidi_browser_tests.py
Add tests for BiDi proxy and cert features
py/test/selenium/webdriver/common/bidi_browser_tests.py
accept_insecure_certs
parameterfunctionality