{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "zseven-w-dsh-android--automate-ui-check-by-element-or-text",
 "repo": "ZSeven-W/dsh-android",
 "repo_url": "https://github.com/ZSeven-W/dsh-android",
 "repo_slug": "zseven-w-dsh-android",
 "title": "Check a screen flow by element ID or on-screen text",
 "page_title": "How to check a screen flow by element ID or on-screen text with DSH Android",
 "summary": "Tap buttons by resource-id or text, verify the next screen, and fall back to OCR when the UI tree is empty.",
 "who": "A QA tester who needs to walk through a screen flow on a device and confirm each step with a screenshot.",
 "problem": "Scripted UI tests break when coordinates shift, and manual checks are slow to repeat across builds.",
 "outcome": "Each step is tapped by identity, the expected next text is confirmed, and the result is backed by a screenshot.",
 "steps": [
  "Call android_ui_tree on the streamed device to list the text and resource-id of each node on the foreground screen.",
  "Call android_tap_element with resource_id or text, and set expect_text to a string that should appear on the next screen.",
  "If the tree is empty or the label is baked into an image, call android_tap_text with the query, or android_wait_for with mode appear.",
  "Review the screenshot that comes back with each tap and mark the step as pass or fail.",
  "Repeat for the next screen in the flow until the check is complete."
 ],
 "agent_prompt": "Using the dsh-android plugin, call android_ui_tree on the streamed device, then call android_tap_element on <element resource-id or text> with expect_text set to <text expected on the next screen>. Expected output: a tap result that reports whether the expected text appeared, plus a screenshot path. Verify the expect_text check passed before moving to the next step.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "60 minutes",
 "basis": "readme",
 "caveat": "Taps are sent to whatever is on the live device, so use a test device or emulator rather than a phone with personal data.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "A DeepSeek Harness (DSH) host, tested by the author with DSH 0.1.5-rc.1",
  "adb available on the machine so the plugin can resolve it",
  "A running Android emulator or a USB-connected Android phone",
  "For builds: a Gradle project that has ./gradlew"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/zseven-w-dsh-android/automate-ui-check-by-element-or-text/",
 "md": "https://dedupedai.com/use-cases/zseven-w-dsh-android/automate-ui-check-by-element-or-text/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/zseven-w-dsh-android--automate-ui-check-by-element-or-text.json",
 "api_version": "v1"
}
