问题 appium 并发 2 台手机报错

def desired_cap(data):

    desired_caps = {}
    desired_caps["platformName"] = data["platformName"]
    desired_caps["platformVersion"] = data["platformVersion"]
    desired_caps["deviceName"] = data["deviceName"]
    desired_caps["udid"] = data["udid"]
    desired_caps["appPackage"] = " aaaaaa"  # 此处不好展示
    desired_caps["appActivity"] = "aaaaa"  # 此处不好展示
    desired_caps["noReset"] = True
    desired_caps["unicodeKeyboard"] = True
    desired_caps["resetKeyboard"] = True
    desired_caps ["automationName"] = "uiautomator2"
    desired_caps["newCommandTimeout"] = 1000
    desired_caps ['systemPort'] = data["systemPort"]



    driver = webdriver.Remote('http://'+str(data['ip'])+':'+str(data['port'])+'/wd/hub',desired_caps)

    return driver

systemPort 端口 8020 和 8022

环境

appium : 版本 1.12.0
环境 : mac


↙↙↙阅读原文可查看相关链接,并与作者交流