MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / to_capabilities

Method to_capabilities

py/selenium/webdriver/common/proxy.py:168–185  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

166 )
167
168 def to_capabilities(self):
169 proxy_caps = {"proxyType": self.proxyType["string"].lower()}
170 proxies = [
171 "autodetect",
172 "httpProxy",
173 "proxyAutoconfigUrl",
174 "sslProxy",
175 "noProxy",
176 "socksProxy",
177 "socksUsername",
178 "socksPassword",
179 "socksVersion",
180 ]
181 for proxy in proxies:
182 attr_value = getattr(self, proxy)
183 if attr_value:
184 proxy_caps[proxy] = attr_value
185 return proxy_caps
186
187 def to_bidi_dict(self) -> dict:
188 """Convert proxy settings to BiDi format.

Calls

no outgoing calls