Explorar el Código

fix(device):修复MuMu5.0无法自动获取窗体标题的问题

CiderCue hace 1 año
padre
commit
83f4216c16
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      module/device/handle.py

+ 5 - 0
module/device/handle.py

@@ -257,6 +257,11 @@ class Handle:
         # 事实上 我们只需要最后一个 'MuMu模拟器12',其他的不重要
         # 事实上 我们只需要最后一个 'MuMu模拟器12',其他的不重要
         if 'MuMu模拟器12' in emu_list and 'MuMuPlayer' in emu_list:
         if 'MuMu模拟器12' in emu_list and 'MuMuPlayer' in emu_list:
             emulator_title = 'MuMu模拟器12'
             emulator_title = 'MuMu模拟器12'
+        
+        # MuMu5.0更新,窗体标题改动: 'MuMu模拟器','MuMuNxDevice','MuMu安卓设备'
+        # 如果没有匹配上旧版本,尝试匹配MuMu5.0窗口名                                                                  
+        if emulator_title == '' and 'MuMu安卓设备' in emu_list:
+            emulator_title = 'MuMu安卓设备'
 
 
         if len(emu_list) > 1 and emulator_title == '':
         if len(emu_list) > 1 and emulator_title == '':
             logger.warning(f'Find more than one emulator handle, oas will use the first one {emu_list[0]}')
             logger.warning(f'Find more than one emulator handle, oas will use the first one {emu_list[0]}')