mobile-mcp-ai 2.5.5__py3-none-any.whl → 2.5.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mobile_mcp/__init__.py +1 -1
- mobile_mcp/core/basic_tools_lite.py +27 -6
- {mobile_mcp_ai-2.5.5.dist-info → mobile_mcp_ai-2.5.6.dist-info}/METADATA +17 -30
- {mobile_mcp_ai-2.5.5.dist-info → mobile_mcp_ai-2.5.6.dist-info}/RECORD +8 -8
- {mobile_mcp_ai-2.5.5.dist-info → mobile_mcp_ai-2.5.6.dist-info}/WHEEL +1 -1
- {mobile_mcp_ai-2.5.5.dist-info/licenses → mobile_mcp_ai-2.5.6.dist-info}/LICENSE +0 -0
- {mobile_mcp_ai-2.5.5.dist-info → mobile_mcp_ai-2.5.6.dist-info}/entry_points.txt +0 -0
- {mobile_mcp_ai-2.5.5.dist-info → mobile_mcp_ai-2.5.6.dist-info}/top_level.txt +0 -0
mobile_mcp/__init__.py
CHANGED
|
@@ -2360,22 +2360,43 @@ class BasicMobileToolsLite:
|
|
|
2360
2360
|
return 0.5
|
|
2361
2361
|
|
|
2362
2362
|
def assert_text(self, text: str) -> Dict:
|
|
2363
|
-
"""
|
|
2363
|
+
"""检查页面是否包含文本(支持精确匹配和包含匹配)"""
|
|
2364
2364
|
try:
|
|
2365
|
+
exists = False
|
|
2366
|
+
match_type = ""
|
|
2367
|
+
|
|
2365
2368
|
if self._is_ios():
|
|
2366
2369
|
ios_client = self._get_ios_client()
|
|
2367
2370
|
if ios_client and hasattr(ios_client, 'wda'):
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
+
# 先尝试精确匹配
|
|
2372
|
+
if ios_client.wda(name=text).exists or ios_client.wda(label=text).exists:
|
|
2373
|
+
exists = True
|
|
2374
|
+
match_type = "精确匹配"
|
|
2375
|
+
# 再尝试包含匹配
|
|
2376
|
+
elif ios_client.wda(nameContains=text).exists or ios_client.wda(labelContains=text).exists:
|
|
2377
|
+
exists = True
|
|
2378
|
+
match_type = "包含匹配"
|
|
2379
|
+
else:
|
|
2380
|
+
# Android: 先尝试精确匹配
|
|
2381
|
+
if self.client.u2(text=text).exists():
|
|
2382
|
+
exists = True
|
|
2383
|
+
match_type = "精确匹配"
|
|
2384
|
+
# 再尝试包含匹配
|
|
2385
|
+
elif self.client.u2(textContains=text).exists():
|
|
2386
|
+
exists = True
|
|
2387
|
+
match_type = "包含匹配"
|
|
2388
|
+
|
|
2389
|
+
if exists:
|
|
2390
|
+
message = f"✅ 文本'{text}' 存在({match_type})"
|
|
2371
2391
|
else:
|
|
2372
|
-
|
|
2392
|
+
message = f"❌ 文本'{text}' 不存在"
|
|
2373
2393
|
|
|
2374
2394
|
return {
|
|
2375
2395
|
"success": True,
|
|
2376
2396
|
"found": exists,
|
|
2377
2397
|
"text": text,
|
|
2378
|
-
"
|
|
2398
|
+
"match_type": match_type if exists else None,
|
|
2399
|
+
"message": message
|
|
2379
2400
|
}
|
|
2380
2401
|
except Exception as e:
|
|
2381
2402
|
return {"success": False, "message": f"❌ 断言失败: {e}"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: mobile-mcp-ai
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.6
|
|
4
4
|
Summary: 移动端自动化 MCP Server - 支持 Android/iOS,AI 功能可选(基础工具不需要 AI)
|
|
5
5
|
Home-page: https://github.com/test111ddff-hash/mobile-mcp-ai
|
|
6
6
|
Author: douzi
|
|
@@ -31,21 +31,6 @@ Provides-Extra: ai
|
|
|
31
31
|
Requires-Dist: dashscope>=1.10.0; extra == "ai"
|
|
32
32
|
Requires-Dist: openai>=1.0.0; extra == "ai"
|
|
33
33
|
Requires-Dist: anthropic>=0.3.0; extra == "ai"
|
|
34
|
-
Provides-Extra: test
|
|
35
|
-
Requires-Dist: pytest>=8.0.0; extra == "test"
|
|
36
|
-
Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
|
|
37
|
-
Requires-Dist: allure-pytest>=2.13.0; extra == "test"
|
|
38
|
-
Provides-Extra: dev
|
|
39
|
-
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
40
|
-
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
41
|
-
Requires-Dist: twine>=4.0.0; extra == "dev"
|
|
42
|
-
Requires-Dist: build>=0.10.0; extra == "dev"
|
|
43
|
-
Provides-Extra: ios
|
|
44
|
-
Requires-Dist: tidevice>=0.11.0; extra == "ios"
|
|
45
|
-
Requires-Dist: facebook-wda>=1.4.0; extra == "ios"
|
|
46
|
-
Provides-Extra: h5
|
|
47
|
-
Requires-Dist: Appium-Python-Client>=3.0.0; extra == "h5"
|
|
48
|
-
Requires-Dist: selenium>=4.0.0; extra == "h5"
|
|
49
34
|
Provides-Extra: all
|
|
50
35
|
Requires-Dist: dashscope>=1.10.0; extra == "all"
|
|
51
36
|
Requires-Dist: openai>=1.0.0; extra == "all"
|
|
@@ -55,19 +40,21 @@ Requires-Dist: selenium>=4.0.0; extra == "all"
|
|
|
55
40
|
Requires-Dist: pytest>=8.0.0; extra == "all"
|
|
56
41
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == "all"
|
|
57
42
|
Requires-Dist: allure-pytest>=2.13.0; extra == "all"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
43
|
+
Provides-Extra: dev
|
|
44
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
45
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
46
|
+
Requires-Dist: twine>=4.0.0; extra == "dev"
|
|
47
|
+
Requires-Dist: build>=0.10.0; extra == "dev"
|
|
48
|
+
Provides-Extra: h5
|
|
49
|
+
Requires-Dist: Appium-Python-Client>=3.0.0; extra == "h5"
|
|
50
|
+
Requires-Dist: selenium>=4.0.0; extra == "h5"
|
|
51
|
+
Provides-Extra: ios
|
|
52
|
+
Requires-Dist: tidevice>=0.11.0; extra == "ios"
|
|
53
|
+
Requires-Dist: facebook-wda>=1.4.0; extra == "ios"
|
|
54
|
+
Provides-Extra: test
|
|
55
|
+
Requires-Dist: pytest>=8.0.0; extra == "test"
|
|
56
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
|
|
57
|
+
Requires-Dist: allure-pytest>=2.13.0; extra == "test"
|
|
71
58
|
|
|
72
59
|
# 📱 Mobile MCP AI
|
|
73
60
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
mobile_mcp/__init__.py,sha256=
|
|
1
|
+
mobile_mcp/__init__.py,sha256=sQJZTL_sxQFzmcS7jOtS2AHCfUySz40vhX96N6u1qy4,816
|
|
2
2
|
mobile_mcp/config.py,sha256=yaFLAV4bc2wX0GQPtZDo7OYF9E88tXV-av41fQsJwK4,4480
|
|
3
3
|
mobile_mcp/core/__init__.py,sha256=ndMy-cLAIsQDG5op7gM_AIplycqZSZPWEkec1pEhvEY,170
|
|
4
|
-
mobile_mcp/core/basic_tools_lite.py,sha256=
|
|
4
|
+
mobile_mcp/core/basic_tools_lite.py,sha256=BgzErXm0jfYaVK8Se8vCvMXqCudEnUYWI3yivyzxktg,152356
|
|
5
5
|
mobile_mcp/core/device_manager.py,sha256=PX3-B5bJFnKNt6C8fT7FSY8JwD-ngZ3toF88bcOV9qA,8766
|
|
6
6
|
mobile_mcp/core/dynamic_config.py,sha256=Ja1n1pfb0HspGByqk2_A472mYVniKmGtNEWyjUjmgK8,9811
|
|
7
7
|
mobile_mcp/core/ios_client_wda.py,sha256=Nq9WxevhTWpVpolM-Ymp-b0nUQV3tXLFszmJHbDC4wA,18770
|
|
@@ -24,9 +24,9 @@ mobile_mcp/utils/__init__.py,sha256=8EH0i7UGtx1y_j_GEgdN-cZdWn2sRtZSEOLlNF9HRnY,
|
|
|
24
24
|
mobile_mcp/utils/logger.py,sha256=Sqq2Nr0Y4p03erqcrbYKVPCGiFaNGHMcE_JwCkeOfU4,3626
|
|
25
25
|
mobile_mcp/utils/xml_formatter.py,sha256=uwTRb3vLbqhT8O-udzWT7s7LsV-DyDUz2DkofD3hXOE,4556
|
|
26
26
|
mobile_mcp/utils/xml_parser.py,sha256=QhL8CWbdmNDzmBLjtx6mEnjHgMFZzJeHpCL15qfXSpI,3926
|
|
27
|
-
mobile_mcp_ai-2.5.
|
|
28
|
-
mobile_mcp_ai-2.5.
|
|
29
|
-
mobile_mcp_ai-2.5.
|
|
30
|
-
mobile_mcp_ai-2.5.
|
|
31
|
-
mobile_mcp_ai-2.5.
|
|
32
|
-
mobile_mcp_ai-2.5.
|
|
27
|
+
mobile_mcp_ai-2.5.6.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
28
|
+
mobile_mcp_ai-2.5.6.dist-info/METADATA,sha256=dd3JeAJ-53sZNKzN9-ga11MFJ8rf4YF9Cb8RX6fYq64,10213
|
|
29
|
+
mobile_mcp_ai-2.5.6.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
30
|
+
mobile_mcp_ai-2.5.6.dist-info/entry_points.txt,sha256=KB_FglozgPHBprSM1vFbIzGyheFuHFmGanscRdMJ_8A,68
|
|
31
|
+
mobile_mcp_ai-2.5.6.dist-info/top_level.txt,sha256=lLm6YpbTv855Lbh8BIA0rPxhybIrvYUzMEk9OErHT94,11
|
|
32
|
+
mobile_mcp_ai-2.5.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|