不再用desired_capabilities,用options代替
原来的
desired_caps = { "platformName": "ios", "platformVersion": "11.4", "deviceName": "iPhone 6 Plus", "noReset": True, "udid": "13e29c07168273224cb5f9b3ca972c8a4612f52a", "bundleId": "com.ofo.Bicycle", # "app": "com.ofo.Bicycle", # "orientation": "LANDSCAPE", "xcodeOrgId": "ZW89BDTX94", "xcodeSigningId": "iPhone Developer", "automationName": "xcuitest", # "app": "/Users/XXXX/Desktop/test_ios/your.app" # "usePrebuiltWDA": True } self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)
修改为如下:
option = AppiumOptions() option.set_capability('platformName', 'ios') option.set_capability('platformVersion', '11.4') option.set_capability('deviceName', 'iPhone 6 Plus') option.set_capability('noReset', True) option.set_capability('udid', '13e29c07168273224cb5f9b3ca972c8a4612f52a') option.set_capability('bundleId', 'com.ofo.Bicycle') option.set_capability('xcodeOrgId', 'ZW89BDTX94') option.set_capability('xcodeSigningId', 'iPhone Developer') option.set_capability('automationName', 'xcuitest') self.driver = webdriver.Remote(command_executor='http://127.0.0.1:4723/wd/hub', options=option)
标签:appium,set,DeprecationWarning,option,capability,desired,报错,iPhone,options From: https://www.cnblogs.com/may18/p/17937414