-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open Application not working with Selenium 4.10+ (unexpected keyword argument 'desired_capabilities') #404
Comments
I have also recently come across this issue using the following combination of packages: robotframework 6.1.1 I am using Appium 2.2.2 and uiautomator2@2.34.1 (although issue also seems to occur with appium beta 2.01) When attempting to run the Open Application keyword with the regular necessary values , it fails with the following: TypeError: WebDriver.init() got an unexpected keyword argument 'desired_capabilities' From robot debug.txt:
A workaround for now is to downgrade selenium by running: pip install selenium==4.9.1 Seems to relate to: https://github.com/appium/python-client/pull/879 Oddly this only seems to affect me running on a Fedora 38 machine - a Fedora 39 machine that reports itself as running the same libraries/package combination as above does not appear to run into the same issue for reasons that am yet to figure out! The only obvious relevant difference (aside from OS version) is that Python 3.11.6 is on the F38 machine while the F39 machine is running python 3.12.0 |
Made some progress with this, I think. Certainly it seems that if upgrading robot libraries with pip then perhaps all dependencies/linked libraries are not always upgraded as you might expect. I believe that the issue here might be linked to Appium-Python-Client which gets installed when installing robotframework-appiumlibrary. When checking for upgrades on robotframework-appiumlibrary using pip, the Appium-Python-Client stayed on v2.7.1 .... BUT if I removed all related libraries/packages with pip (e.g. Now I am able to run robotframework-appiumlibrary with the selenium version that it pulls in itself (4.15.2) when installing freshly so give that a try and see if it helps.
Why simply updating using pip doesn't do this automatically? I am not sure (someone else can probably explain) but a fresh install of the pip libraries/packages seems to have worked for me in relation to this issue anyway. |
My test suite has been working just fine until now, but since upgrading to packages robotframework-appiumlibrary=2.0.0, Selenium=4.14.0 and appium-python-client=3.1.0, currently the latest, the Open Application keyword throws the following error:
Error installing app: TypeError: WebDriver.__init__() got an unexpected keyword argument 'desired_capabilities'
Selenium 4.10+ has fully deprecated the 'desired_capabilities' arguments, using 'options' instead. appium-python-client has already made the jump to remove the deprecated arguments from all calls, but when I inspect the appium webdriver at appiumlibrary's _applicationmanagement.py -> open_application, I still see an older build of the webdriver from appium-python-client, that still passes the deprecated arguments, causing a crash from what I can tell. Perhaps an outdated reference, or issue with the version requirements?
If I am doing something wrong on my end, please let me know, too. Thank you.
The text was updated successfully, but these errors were encountered: