I’m new to Appium automation in Python, this is my first project actually.
I don’t use selenium in this project.
This is my code:
`from appium import webdriver
from os import path
CUR_DIR = path.dirname(path.abspath(__file__))
APP = path.join(CUR_DIR, 'TheApp.app.zip')
APPIUM = 'http://localhost:4723'
CAPS = {
'platformName': 'iOS',
'platformVersion': '17.4',
'deviceName': 'iPhone 12 mini',
'automationName': 'XCUITest',
'app': APP,
}
driver = webdriver.Remote(
command_executor=APPIUM,
desired_capabilities=CAPS
)`
When I run the code I get
TypeError: WebDriver.__init__() got an unexpected keyword argument 'desired_capabilities'
I found out that DesiredCapabilities
was removed and I should transform it into Options
, but I don’t find how to do it for Appium, only for Selenium.
What can I do?
Robi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.