android-midscene-automation 1.1.1 → 1.1.2
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# 更新记录
|
|
2
|
+
## v1.1.2
|
|
3
|
+
- [Appium]修复登录等点击操作已经触发 Activity 跳转后,持续动画或频繁界面事件仍让 UiAutomator2 长时间等待、最终误报点击超时的问题;限制界面空闲等待时间,避免命令队列被长期占用。
|
|
4
|
+
|
|
2
5
|
## v1.1.1
|
|
3
|
-
更新README.md
|
|
6
|
+
- [文档]更新 README.md。
|
|
4
7
|
|
|
5
8
|
## v1.1.0
|
|
6
9
|
- [Artemis]修复自定义模型返回 `<think>` 思考标签导致 Hopper 等节点 JSON 解析失败的问题:非 Google 模型的 Pydantic 结构化输出接入统一清理、提取和校验流程,显式提供 JSON Schema,格式错误时限次要求模型纠正。
|
package/README.md
CHANGED
|
@@ -1502,8 +1502,11 @@ Linux: ~/.local/share/android-midscene-automation
|
|
|
1502
1502
|
|
|
1503
1503
|
# 项目更新记录
|
|
1504
1504
|
|
|
1505
|
+
## v1.1.2
|
|
1506
|
+
- [Appium]修复登录等点击操作已经触发 Activity 跳转后,持续动画或频繁界面事件仍让 UiAutomator2 长时间等待、最终误报点击超时的问题;限制界面空闲等待时间,避免命令队列被长期占用。
|
|
1507
|
+
|
|
1505
1508
|
## v1.1.1
|
|
1506
|
-
更新README.md
|
|
1509
|
+
- [文档]更新 README.md。
|
|
1507
1510
|
|
|
1508
1511
|
## v1.1.0
|
|
1509
1512
|
- [Artemis]修复自定义模型返回 `<think>` 思考标签导致 Hopper 等节点 JSON 解析失败的问题:非 Google 模型的 Pydantic 结构化输出接入统一清理、提取和校验流程,显式提供 JSON Schema,格式错误时限次要求模型纠正。
|
package/package.json
CHANGED
|
@@ -50,6 +50,7 @@ type AppiumValueResponse<T> = {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
const ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';
|
|
53
|
+
const UIAUTOMATOR_IDLE_TIMEOUT_MS = 1000;
|
|
53
54
|
const configuredAppiumServerUrl = () => (process.env.APPIUM_SERVER_URL || 'http://127.0.0.1:4723').replace(/\/+$/, '');
|
|
54
55
|
|
|
55
56
|
class ReplayStoppedError extends Error {
|
|
@@ -420,6 +421,9 @@ async function createSession(deviceId: string) {
|
|
|
420
421
|
'appium:udid': deviceId,
|
|
421
422
|
'appium:autoLaunch': false,
|
|
422
423
|
'appium:noReset': true,
|
|
424
|
+
// 实时画面、动画和频繁无障碍事件可能让 UiAutomator2 长时间等不到界面空闲。
|
|
425
|
+
// 节点已有显式等待,因此这里只保留很短的空闲窗口,避免点击已生效后请求仍占住命令队列。
|
|
426
|
+
'appium:settings': { waitForIdleTimeout: UIAUTOMATOR_IDLE_TIMEOUT_MS },
|
|
423
427
|
// 托管进程由 finally 释放;外部服务保留回收期限,避免创建请求取消后遗留永久会话。
|
|
424
428
|
'appium:newCommandTimeout': usesManagedAppiumServer() ? 0 : 60,
|
|
425
429
|
'appium:skipDeviceInitialization': true,
|
|
@@ -47,6 +47,7 @@ test('replay survives command idle periods and cleans sessions after success, ab
|
|
|
47
47
|
if (path === '/session' && init?.method === 'POST') {
|
|
48
48
|
if (mode === 'creation-failure') return Response.json({ value: { error: 'session not created', message: 'creation failed' } }, { status: 500 });
|
|
49
49
|
const capabilities = JSON.parse(String(init.body)).capabilities.alwaysMatch;
|
|
50
|
+
assert.deepEqual(capabilities['appium:settings'], { waitForIdleTimeout: 1000 }, 'bound UiAutomator idle waits for animated screens');
|
|
50
51
|
commandTimeoutMs = (capabilities['appium:newCommandTimeout'] ?? 60) * 1000;
|
|
51
52
|
lastCommandMs = elapsedMs;
|
|
52
53
|
return Response.json({ value: { sessionId: 'test-session' } });
|