openatx / uiautomator2

Android Uiautomator2 Python Wrapper
MIT License
6.38k stars 1.37k forks source link

多进程 #886

Closed elileo1 closed 1 year ago

elileo1 commented 1 year ago

uiautomator2 2.16.23

def test(device_id): d = u2.connect(device_id)

if name == 'main': adb = ADB() dIdList = adb.get_devices() if len(dIdList) == 0: print("请先连接设备") else: process_list = [] for phone in dIdList: p = Process(target=test, args=(phone, )) p.start() process_list.append(p)

    for progress in process_list:
        progress.join()

    print('结束测试')

运行直接崩溃崩溃日志: objc[75376]: +[NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. objc[75376]: +[NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

elileo1 commented 1 year ago

手机型号: 华为 mate 30 pro 系统 harmonyOS 3.0.0 uiautomator2版本号: 2.16.23