Skip to content

Commit 28300e4

Browse files
committed
add warning
1 parent 52e2c60 commit 28300e4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

appium/webdriver/webdriver.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,14 @@
6464

6565

6666
class AppiumLocatorConverter:
67-
def convert(self, by, value):
67+
"""A custom locator converter in Appium.
68+
69+
Appium supports locators which are not defined in W3C WebDriver,
70+
so Appium Python client wants to keep the given locators
71+
to the Appium server as-is.
72+
"""
73+
74+
def convert(self, by: str, value: str) -> tuple[str, str]:
6875
return (by, value)
6976

7077

@@ -222,6 +229,11 @@ def __init__( # noqa: PLR0913
222229
)
223230
client_config.remote_server_addr = command_executor
224231
command_executor = AppiumConnection(remote_server_addr=command_executor, client_config=client_config)
232+
elif isinstance(command_executor, AppiumConnection) and strict_ssl is False:
233+
logger.warning(
234+
"Please set 'ignore_certificates' in the given 'appium.webdriver.appium_connection.AppiumConnection' or "
235+
"'selenium.webdriver.remote.client_config.ClientConfig' instead. Ignoring."
236+
)
225237

226238
super().__init__(
227239
command_executor=command_executor,

0 commit comments

Comments
 (0)