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

Class _ProxyTypeDescriptor

py/selenium/webdriver/common/proxy.py:58–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57
58class _ProxyTypeDescriptor:
59 def __init__(self, name, p_type):
60 self.name = name
61 self.p_type = p_type
62
63 def __get__(self, obj, cls):
64 return getattr(obj, self.name)
65
66 def __set__(self, obj, value):
67 if self.name == "autodetect" and not isinstance(value, bool):
68 raise ValueError("Autodetect proxy value needs to be a boolean")
69 getattr(obj, "_verify_proxy_type_compatibility")(self.p_type)
70 setattr(obj, "proxyType", self.p_type)
71 setattr(obj, self.name, value)
72
73
74class Proxy:

Callers 1

ProxyClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected