Getting TypeError: WebDriver.__init__() got an unexpected keyword argument 'desired_capabilities' when using Appium with Selenium 4.10

Error: HOOK-ERROR in before_scenario: TypeError: WebDriver.__init__() got an unexpected keyword argument 'desired_capabilities'

Hello, we currently cannot run our script together with the latest Selenium 4.10. Is this Appium error or Python error?

capabilities = {
    "platformName": "Android",
    "appium:platformVersion": "11.0",
    "appium:deviceName": "emulator-5554",
    "appium:app": "/Users/faithberroya/Downloads/test.apk",
    "appium:automationName": "UiAutomator2",
    "appium:appPackage": "com.test.school.assignment.rc",
    "appium:appActivity": "com.test.school.assignment.ui.SplashActivity"
}

# launch app
context.driver = webdriver.Remote("http://0.0.0.0:4723/wd/hub", capabilities)
# add wait time
context.driver.implicitly_wait(20)
# app
context.app = Application(context.driver)

Current pip list
Appium-Python-Client 2.10.1
async-generator 1.10
attrs 23.1.0
behave 1.2.6
CacheControl 0.13.0
cachetools 5.3.1
certifi 2023.5.7
cffi 1.15.1
charset-normalizer 3.1.0
cryptography 41.0.1
exceptiongroup 1.1.1
firebase-admin 6.1.0
google-api-core 2.11.0
google-api-python-client 2.88.0
google-auth 2.19.1
google-auth-httplib2 0.1.0
google-cloud-core 2.3.2
google-cloud-firestore 2.11.1
google-cloud-storage 2.9.0
google-crc32c 1.5.0
google-resumable-media 2.5.0
googleapis-common-protos 1.59.0
grpcio 1.54.2
grpcio-status 1.54.2
h11 0.14.0
httplib2 0.22.0
idna 3.4
msgpack 1.0.5
outcome 1.2.0
parse 1.19.0
parse-type 0.6.0
pip 23.1.1
proto-plus 1.22.2
protobuf 4.23.2
pyasn1 0.5.0
pyasn1-modules 0.3.0
pycparser 2.21
PyJWT 2.7.0
pyOpenSSL 23.2.0
pyparsing 3.0.9
PySocks 1.7.1
requests 2.31.0
rsa 4.9
selenium 4.9.0
setuptools 67.7.1
six 1.16.0
slack-sdk 3.21.3
sniffio 1.3.0
sortedcontainers 2.4.0
trio 0.22.0
trio-websocket 0.10.2
uritemplate 4.1.1
urllib3 1.26.16
urllib3-secure-extra 0.1.0
wheel 0.40.0
wsproto 1.2.0

It is a compatibility issue caused by breaking changes that have been added to the selenium client in version 4.10

1 Like