fix: 引入导航缓存机制,增强 UI 适配能力 (BUG-004)
This commit is contained in:
@@ -123,6 +123,11 @@ class WeChatADBEngine:
|
||||
return ""
|
||||
|
||||
def _find_text(self, text: str, xml: str = None) -> Optional[Tuple[int, int]]:
|
||||
# 优先从导航缓存读取
|
||||
from services.wechat_nav_cache import nav_cache
|
||||
cached = nav_cache.get_page("current")
|
||||
if cached and text in cached.get("elements", {}):
|
||||
return cached["elements"][text].get("center")
|
||||
if xml is None:
|
||||
xml = self._get_xml()
|
||||
if not xml:
|
||||
|
||||
Reference in New Issue
Block a user