Skip to content

Commit 4599c96

Browse files
committed
add example of ClientConfig
1 parent d37e6df commit 4599c96

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,6 @@ driver = webdriver.Remote(
291291
292292
## Relax SSL validation
293293
294-
TODO: add 'ClientConfig' method way.
295-
296294
`strict_ssl` option allows you to send commands to an invalid certificate host like a self-signed one.
297295
298296
```python
@@ -313,9 +311,21 @@ options.set_capability('browser_name', 'safari')
313311
driver = webdriver.Remote('http://127.0.0.1:4723', options=options, strict_ssl=False)
314312
```
315313
316-
## Set custom `AppiumConnection`
314+
Since Appium Python client v5, we recommend using ClientConfig instead.
315+
316+
```python
317+
from appium import webdriver
318+
319+
from selenium.webdriver.remote.client_config import ClientConfig
317320
318-
TODO: add 'ClientConfig' example as well.
321+
client_config = ClientConfig(
322+
remote_server_addr='http://127.0.0.1:4723',
323+
ignore_certificates=True
324+
)
325+
driver = webdriver.Remote(client_config.remote_server_addr, options=options, client_config=client_config)
326+
```
327+
328+
## Set custom `AppiumConnection`
319329
320330
The first argument of `webdriver.Remote` can set an arbitrary command executor for you.
321331
@@ -368,6 +378,7 @@ driver = webdriver.Remote(custom_executor, options=options)
368378
369379
```
370380
381+
The `AppiumConnection` can set `selenium.webdriver.remote.client_config.ClientConfig` as well.
371382
372383
## Documentation
373384

0 commit comments

Comments
 (0)