Skip to content

Mobile MCP: let AI agents drive your iOS and Android apps. MCP server for simulators, emulators and real devices. Works with Claude Code, Codex, Cursor and any MCP client.

fix: include elements with resource-id or checkable attribute in Android element detection (#254)

Sumeet Singh Arora50c9a9af620a
diff --git a/src/android.ts b/src/android.ts
index 49c156d..ae47041 100644
--- a/src/android.ts
+++ b/src/android.ts
@@ -18,6 +18,7 @@ interface UiAutomatorXmlNode {
bounds?: string;
hint?: string;
focused?: string;
+ checkable?: string;
"content-desc"?: string;
"resource-id"?: string;
}
@@ -321,7 +322,7 @@ export class AndroidRobot implements Robot {
}
}
- if (node.text || node["content-desc"] || node.hint) {
+ if (node.text || node["content-desc"] || node.hint || node["resource-id"] || node.checkable === "true") {
const element: ScreenElement = {
type: node.class || "text",
text: node.text,