Summary
Passing proxy= as a keyword argument to CDP Mode (sb_cdp.Chrome / cdp_util.start) raises UnboundLocalError for non-authenticated proxies (no @ in the string).
Environment
- SeleniumBase: latest
- Python: 3.13
- OS: Linux (Ubuntu)
- Mode: CDP Mode via
sb_cdp.Chrome(...)
Steps to reproduce
from seleniumbase import sb_cdp
sb = sb_cdp.Chrome(
url="https://example.com",
proxy="http://127.0.0.1:8080",
)
I think there’s an issue in this elif branch. It looks like proxy_string may not have been initialized at that point, so the validation should probably use proxy instead:
elif proxy:
proxy = proxy_helper.validate_proxy_string(proxy_string) # bug: should be `proxy`
Summary
Passing
proxy=as a keyword argument to CDP Mode (sb_cdp.Chrome/cdp_util.start) raisesUnboundLocalErrorfor non-authenticated proxies (no@in the string).Environment
sb_cdp.Chrome(...)Steps to reproduce
I think there’s an issue in this
elifbranch. It looks likeproxy_stringmay not have been initialized at that point, so the validation should probably useproxyinstead: