selenium.webdriver.remote.remote_connection¶
Classes
|
A connection with the Remote WebDriver server. |
- class selenium.webdriver.remote.remote_connection.RemoteConnection(remote_server_addr: str | None = None, keep_alive: bool | None = True, ignore_proxy: bool | None = False, ignore_certificates: bool | None = False, init_args_for_pool_manager: dict | None = None, client_config: ClientConfig | None = None)[source]¶
A connection with the Remote WebDriver server.
Communicates with the server using the WebDriver wire protocol: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol
- browser_name = None¶
- os = <module 'os' from '/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/os.py'>¶
- socket = <module 'socket' from '/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/socket.py'>¶
- certifi = <module 'certifi' from '/home/runner/work/selenium/selenium/py/.tox/docs/lib/python3.9/site-packages/certifi/__init__.py'>¶
- system = 'linux'¶
- extra_headers = None¶
- user_agent = 'selenium/4.30.0 (python linux)'¶
- classmethod get_timeout()[source]¶
- Returns:
Timeout value in seconds for all http requests made to the Remote Connection
- classmethod set_timeout(timeout)[source]¶
Override the default timeout.
- Args:
timeout - timeout value for http requests in seconds
- classmethod reset_timeout()[source]¶
Reset the http request timeout to socket._GLOBAL_DEFAULT_TIMEOUT.
- classmethod get_certificate_bundle_path()[source]¶
- Returns:
Paths of the .pem encoded certificate to verify connection to command executor. Defaults to certifi.where() or REQUESTS_CA_BUNDLE env variable if set.
- classmethod set_certificate_bundle_path(path)[source]¶
Set the path to the certificate bundle to verify connection to command executor. Can also be set to None to disable certificate validation.
- Args:
path - path of a .pem encoded certificate chain.
- classmethod get_remote_connection_headers(parsed_url, keep_alive=False)[source]¶
Get headers for remote request.
- Args:
parsed_url - The parsed url
keep_alive (Boolean) - Is this a keep-alive connection (default: False)
- extra_commands = {}¶
- execute(command, params)[source]¶
Send a command to the remote server.
Any path substitutions required for the URL mapped to the command should be included in the command parameters.
- Args:
command - A string specifying the command to execute.
params - A dictionary of named parameters to send with the command as its JSON payload.