原本一开始是可以正常运行的,不知道怎么就出现这个问题了
PS D:\Project\APP_AUTO_TEST_PYTEST> & "D:/Program Files/Miniconda3/envs/autotest/python.exe" d:/Project/APP_AUTO_TEST_PYTEST/utils/utils.py
Traceback (most recent call last):
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request
self._validate_conn(conn)
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\connectionpool.py", line 1099, in _validate_conn
conn.connect()
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\connection.py", line 653, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\connection.py", line 806, in _ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\util\ssl_.py", line 465, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\util\ssl_.py", line 509, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\ssl.py", line 455, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\ssl.py", line 1042, in _create
self.do_handshake()
File "D:\Program Files\Miniconda3\envs\autotest\Lib\ssl.py", line 1320, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1000)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\connectionpool.py", line 793, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request
raise new_e
urllib3.exceptions.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1000)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "d:\Project\APP_AUTO_TEST_PYTEST\utils\utils.py", line 45, in <module>
driver = webdriver.Remote(APPIUM_SERVER, options=UiAutomator2Options().load_capabilities(get_desired()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\appium\webdriver\webdriver.py",
line 229, in __init__
super().__init__(
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 208, in __init__
self.start_session(capabilities)
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\appium\webdriver\webdriver.py",
line 320, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, w3c_caps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 345, in execute
response = self.command_executor.execute(driver_command, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 302, in execute
return self._request(command_info[0], url, body=data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 322, in _request
response = self._conn.request(method, url, body=body, headers=headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\_request_methods.py", line 144, in request
return self.request_encode_body(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\_request_methods.py", line 279, in request_encode_body
return self.urlopen(method, url, **extra_kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\poolmanager.py", line 444, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\connectionpool.py", line 877, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\connectionpool.py", line 877, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\connectionpool.py", line 877, in urlopen
return self.urlopen(
^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\connectionpool.py", line 847, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Miniconda3\envs\autotest\Lib\site-packages\urllib3\util\retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='localhost', port=4723): Max retries exceeded with url: /wd/hub/session (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1000)')))