Skip to content

Commit

Permalink
[py] Add backward compatibility for AppiumConnection
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Oct 31, 2024
1 parent bdfbb70 commit 88d66a9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions py/selenium/webdriver/remote/remote_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,18 @@ class RemoteConnection:
"""

browser_name = None
# Keep backward compatibility for AppiumConnection - https://github.com/SeleniumHQ/selenium/issues/14694
import os
import socket

import certifi

_timeout = (
float(os.getenv("GLOBAL_DEFAULT_TIMEOUT", str(socket.getdefaulttimeout())))
if os.getenv("GLOBAL_DEFAULT_TIMEOUT") is not None
else socket.getdefaulttimeout()
)
_ca_certs = os.getenv("REQUESTS_CA_BUNDLE") if "REQUESTS_CA_BUNDLE" in os.environ else certifi.where()
_client_config: ClientConfig = None

system = platform.system().lower()
Expand Down Expand Up @@ -296,6 +308,9 @@ def __init__(
init_args_for_pool_manager=init_args_for_pool_manager,
)

# Keep backward compatibility for AppiumConnection - https://github.com/SeleniumHQ/selenium/issues/14694
RemoteConnection._timeout = self._client_config.timeout
RemoteConnection._ca_certs = self._client_config.ca_certs
RemoteConnection._client_config = self._client_config

if remote_server_addr:
Expand Down

0 comments on commit 88d66a9

Please sign in to comment.