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

Method __init__

py/selenium/webdriver/remote/client_config.py:121–168  ·  view source on GitHub ↗
(
        self,
        remote_server_addr: str,
        keep_alive: bool | None = True,
        proxy: Proxy | None = None,
        ignore_certificates: bool | None = False,
        init_args_for_pool_manager: dict | None = None,
        timeout: int | None = None,
        ca_certs: str | None = None,
        username: str | None = None,
        password: str | None = None,
        auth_type: AuthType | None = AuthType.BASIC,
        token: str | None = None,
        user_agent: str | None = None,
        extra_headers: dict | None = None,
        websocket_timeout: float | None = 30.0,
        websocket_interval: float | None = None,
        websocket_max_message_size: int | None = None,
    )

Source from the content-addressed store, hash-verified

119 """
120
121 def __init__(
122 self,
123 remote_server_addr: str,
124 keep_alive: bool | None = True,
125 proxy: Proxy | None = None,
126 ignore_certificates: bool | None = False,
127 init_args_for_pool_manager: dict | None = None,
128 timeout: int | None = None,
129 ca_certs: str | None = None,
130 username: str | None = None,
131 password: str | None = None,
132 auth_type: AuthType | None = AuthType.BASIC,
133 token: str | None = None,
134 user_agent: str | None = None,
135 extra_headers: dict | None = None,
136 websocket_timeout: float | None = 30.0,
137 websocket_interval: float | None = None,
138 websocket_max_message_size: int | None = None,
139 ) -> None:
140 self.remote_server_addr = remote_server_addr
141 self.keep_alive = keep_alive
142 self.proxy = Proxy(raw={"proxyType": ProxyType.SYSTEM}) if proxy is None else proxy
143 self.ignore_certificates = ignore_certificates
144 # Copy caller-owned dicts so two ClientConfigs (or the caller's own dict) can't be
145 # aliased into one another and mutated in place.
146 self.init_args_for_pool_manager = dict(init_args_for_pool_manager or {})
147 self.timeout = socket.getdefaulttimeout() if timeout is None else timeout
148 self.username = username
149 self.password = password
150 self.auth_type = auth_type
151 self.token = token
152 self.user_agent = user_agent
153 self.extra_headers = dict(extra_headers) if extra_headers is not None else None
154 self.websocket_timeout = websocket_timeout
155 if websocket_interval is not None:
156 warnings.warn(
157 "websocket_interval does nothing and will be removed",
158 DeprecationWarning,
159 stacklevel=2,
160 )
161 self._websocket_interval = websocket_interval
162 self.websocket_max_message_size = websocket_max_message_size
163
164 self.ca_certs = (
165 (os.getenv("REQUESTS_CA_BUNDLE") if "REQUESTS_CA_BUNDLE" in os.environ else certifi.where())
166 if ca_certs is None
167 else ca_certs
168 )
169
170 def reset_timeout(self) -> None:
171 """Resets the timeout to the default value of socket."""

Callers

nothing calls this directly

Calls 2

ProxyClass · 0.90
warnMethod · 0.45

Tested by

no test coverage detected