diff --git a/docs/webdriver.md b/docs/webdriver.md index 6c9c7022..e7187b06 100644 --- a/docs/webdriver.md +++ b/docs/webdriver.md @@ -29,17 +29,15 @@ In the python script: ```python from selenium import webdriver -def capabilities(): - return { - "wpe:browserOptions": { - "binary": "/usr/bin/cog", - "args": ["--automation", "--platform=wl"], - } - } +options = webdriver.WPEWebKitOptions() +options.capabilities.clear() +options.binary_location = "/usr/bin/cog" +options.add_argument("--automation") +options.add_argument("--platform=wl") driver = webdriver.Remote( command_executor="http://YOUR_DEVICE_IP:8088", - desired_capabilities=capabilities(), + options=options, ) ``` @@ -63,4 +61,4 @@ pointer = actions.pointer_action pointer.move_to(board, x, y) pointer.click() actions.perform() -``` \ No newline at end of file +```