Skip to content

feat(android): add standalone accessibility XPath audit core - #2891

Open
quanruzhuoxiu wants to merge 1 commit into
mainfrom
feat/android-xpath-audit-core-standalone
Open

feat(android): add standalone accessibility XPath audit core#2891
quanruzhuoxiu wants to merge 1 commit into
mainfrom
feat/android-xpath-audit-core-standalone

Conversation

@quanruzhuoxiu

Copy link
Copy Markdown
Collaborator

Summary

  • add internal XML parsing, structural XPath, candidate generation, and replay-query primitives used by the audit workflow
  • capture the exact Android accessibility XML source with YADB-to-UIAutomator fallback and normalize it into a complete UiNode tree
  • add source/fresh/revisit audit modeling, metadata collection, report data generation, and cross-stack fixtures

Scope

This PR is self-contained on main. It does not enable production XPath caching, add a cache feature flag, or depend on another unmerged PR. The internal XPath primitives are introduced only to support the audit tool in this stack.

Stack order:

  1. this PR: audit core and Android capture support
  2. feat/android-xpath-audit-cli-standalone: capture CLI and static HTML report
  3. feat/android-xpath-audit-playground-standalone: live Playground audit UI

Validation

  • pnpm --filter @midscene/core exec vitest --config vitest.config.ts --run tests/unit-test/device-cache/parse-xml.test.ts tests/unit-test/device-cache/xpath-cross-state.test.ts tests/unit-test/device-cache/xpath-query.test.ts tests/unit-test/device-cache/xpath-tree.test.ts (77 tests)
  • pnpm --filter @midscene/android exec vitest --config vitest.config.ts --run tests/unit-test/audit-metadata.test.ts tests/unit-test/cache-compatibility.test.ts tests/unit-test/page.test.ts tests/unit-test/uiautomator-tree.test.ts tests/unit-test/xpath-audit.test.ts (231 tests)
  • pnpm exec nx run-many --target=build --projects=@midscene/core,@midscene/android --skip-nx-cache
  • pnpm run lint

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploying midscene with  Cloudflare Pages  Cloudflare Pages

Latest commit: 88e5aa6
Status: ✅  Deploy successful!
Preview URL: https://4b5c709f.midscene.pages.dev
Branch Preview URL: https://feat-android-xpath-audit-cor-ezpq.midscene.pages.dev

View logs

@quanru
quanru force-pushed the feat/android-xpath-audit-core-standalone branch from e55803b to 88e5aa6 Compare August 12, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants