@@ -58,6 +58,35 @@ For example, some changes in the Selenium binding could break the Appium client.
5858> to keep compatible version combinations.
5959
6060
61+ # ## Quick migration guide from v4 to v5
62+ - Please use ` AppiumClientConfig` as ` client_config` arguemnt in favor of client arguments below
63+ - ` keep_alive` , ` direct_connection` and ` strict_ssl` arguments.
64+ ` ` ` python
65+ SERVER_URL_BASE = ' http://127.0.0.1:4723'
66+ # before
67+ driver = webdriver.Remote(
68+ SERVER_URL_BASE,
69+ options=UiAutomator2Options().load_capabilities(desired_caps),
70+ direct_connection=True,
71+ keep_alive=False,
72+ strict_ssl=False
73+ )
74+
75+ # after
76+ from appium.webdriver.client_config import AppiumClientConfig
77+ client_config = AppiumClientConfig(
78+ remote_server_addr=SERVER_URL_BASE,
79+ direct_connection=True,
80+ keep_alive=False,
81+ ignore_certificates=True,
82+ )
83+ driver = webdriver.Remote(
84+ SERVER_URL_BASE,
85+ options=UiAutomator2Options().load_capabilities(desired_caps),
86+ client_config=client_config
87+ )
88+ ` ` `
89+
6190# ## Quick migration guide from v3 to v4
6291- Removal
6392 - ` MultiAction` and ` TouchAction` are removed. Please use W3C WebDriver actions or ` mobile:` extensions
@@ -273,6 +302,7 @@ from appium import webdriver
273302# If you use an older client then switch to desired_capabilities
274303# instead: https://github.com/appium/python-client/pull/720
275304from appium.options.ios import XCUITestOptions
305+ from appium.webdriver.client_config import AppiumClientConfig
276306
277307# load_capabilities API could be used to
278308# load options mapping stored in a dictionary
@@ -282,11 +312,16 @@ options = XCUITestOptions().load_capabilities({
282312 ' app' : ' /full/path/to/app/UICatalog.app.zip' ,
283313})
284314
315+ client_config = AppiumClientConfig(
316+ remote_server_addr=' http://127.0.0.1:4723' ,
317+ direct_connection=True
318+ )
319+
285320driver = webdriver.Remote(
286321 # Appium1 points to http://127.0.0.1:4723/wd/hub by default
287322 ' http://127.0.0.1:4723' ,
288323 options=options,
289- direct_connection=True
324+ client_config=client_config
290325)
291326` ` `
292327
0 commit comments