Skip to content

[py] fix proxy options#12029

Merged
titusfortner merged 1 commit intotrunkfrom
py_proxy
May 25, 2023
Merged

[py] fix proxy options#12029
titusfortner merged 1 commit intotrunkfrom
py_proxy

Conversation

@titusfortner
Copy link
Copy Markdown
Member

Description

Allow Proxy to be used in any browser

Motivation and Context

I added proxy property to Base Options class right before Se 4.0, but I didn't add the part that would actually add it to the capabilities. So right now I think proxy only works as intended for Firefox.

I'm removing add_to_capabilities() because it's a weird way to serialize a class, and also because capabilities is deprecated so no one should be passing it around. If we're just using options class, then we just need a way to serialize it, so I'm renaming the logic to_capabilities(). When we serialize it in options, we don't have to add logic in remote webdriver class.

@titusfortner titusfortner requested a review from symonk May 12, 2023 00:26
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 12, 2023

Codecov Report

Patch coverage: 20.00% and project coverage change: +0.01 🎉

Comparison is base (35530cc) 54.85% compared to head (fc00ff4) 54.86%.

❗ Current head fc00ff4 differs from pull request most recent head e5933f2. Consider uploading reports for the commit e5933f2 to get more accurate results

❗ 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   #12029      +/-   ##
==========================================
+ Coverage   54.85%   54.86%   +0.01%     
==========================================
  Files          86       86              
  Lines        5728     5725       -3     
  Branches      233      233              
==========================================
- Hits         3142     3141       -1     
+ Misses       2353     2351       -2     
  Partials      233      233              
Impacted Files Coverage Δ
py/selenium/webdriver/common/proxy.py 17.28% <0.00%> (ø)
py/selenium/webdriver/firefox/options.py 70.58% <ø> (+0.13%) ⬆️
py/selenium/webdriver/remote/webdriver.py 42.12% <ø> (+0.16%) ⬆️
py/selenium/webdriver/common/options.py 75.00% <50.00%> (-0.52%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@titusfortner titusfortner force-pushed the py_proxy branch 8 times, most recently from 34f9d34 to a4a456a Compare May 14, 2023 01:25
@titusfortner titusfortner added the C-py Python Bindings label May 15, 2023
@titusfortner titusfortner added this to the 4.10 milestone May 18, 2023
Copy link
Copy Markdown
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me, but wondering what @AutomatedTester and @symonk think.

Comment thread py/selenium/webdriver/common/proxy.py
@titusfortner titusfortner merged commit 6a776f3 into trunk May 25, 2023
@titusfortner titusfortner deleted the py_proxy branch May 25, 2023 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-py Python Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants