1 year ago
#326854
pylonspidy
DeprecationWarning: desired_capabilities has been deprecated, please pass in an Options object with options kwarg
I'm relatively new to Winium (1.6.0.0) , Selenium (4.1.3) and Python (3.10.2). I want to automate a simple app like calculator I implemented some suggested code but it's for an older version of Selenium
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.by import By
import os
os.startfile(r'c:\\test\\winium.desktop.driver.exe')
driver = webdriver.Remote(command_executor='http://localhost:9999', desired_capabilities={'app': "C:\\Windows\\System32\\calc.exe","args": '-port 345'})
I get the following error from Pycharm:
DeprecationWarning: desired_capabilities has been deprecated, please pass in an Options object with options kwarg*
driver = webdriver.Remote(command_executor='http://localhost:9999', desired_capabilities={'app': "C:\\Windows\\System32\\calc.exe","args": '-port 345'})
How do I update the code to use an Options object instead?
thanks
I tried adjusting the options, but I am uncertain to what options I should be using to test a windows application
python
selenium
desktop-application
windows-10-desktop
winium
0 Answers
Your Answer