mirror of
https://github.com/web-infra-dev/midscene.git
synced 2025-07-25 18:01:27 +00:00

* feat: enable search area for locate * fix: update evaluation * fix: locator * feat: show searchArea in report * chore: add yaml support for aiTap * feat: use adb instead appium * feat: Adds debugging information and reconstructs input text capabilities * feat: refactoring Android related functions and adding android modules * feat: update the image scaling algorithm, adjust the Android page class to support device scaling, and remove test files that are no longer needed * feat: adjust the Android page class to support device scaling, and remove test files that are no longer needed * feat: use appium-adb instead of bare command * fix: update entry for @midscene/android * feat: optimize the screenshot processing logic, add a backup mechanism when screenshots fail, and update test cases to accommodate new features * fix: rethrow error * feat: add Android debug configuration options and update documentation * chore: fix code style in #483 (#492) * fix: remove try for error handle by outside --------- Co-authored-by: yutao <yutao.tao@bytedance.com> Co-authored-by: linyibing <linyibing@bytedance.com> Co-authored-by: yuyutaotao <167746126+yuyutaotao@users.noreply.github.com>
29 lines
698 B
TypeScript
29 lines
698 B
TypeScript
import { AndroidAgent } from '@/android';
|
|
import { describe, it, vi } from 'vitest';
|
|
import { launchPage } from './utils';
|
|
|
|
vi.setConfig({
|
|
testTimeout: 90 * 1000,
|
|
});
|
|
|
|
const DEVICE_ID = process.env.ANDROID_DEVICE_ID;
|
|
|
|
describe(
|
|
'android integration',
|
|
async () => {
|
|
await it('Android settings page demo for scroll', async () => {
|
|
const page = await launchPage({
|
|
deviceId: DEVICE_ID,
|
|
app: {
|
|
pkg: 'com.android.settings',
|
|
activity: '.Settings',
|
|
},
|
|
});
|
|
const agent = new AndroidAgent(page);
|
|
await agent.aiAction('点击输入框');
|
|
await agent.aiAction('在输入框输入你好 世界');
|
|
});
|
|
},
|
|
360 * 1000,
|
|
);
|