{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "ggoggam-vitre--read-page-data-in-app",
 "repo": "ggoggam/vitre",
 "repo_url": "https://github.com/ggoggam/vitre",
 "repo_slug": "ggoggam-vitre",
 "title": "Read a value from a page your app does not own",
 "page_title": "How to read a value from a page your app does not own with Vitre",
 "summary": "Navigate to a page, wait for a marker element, and extract text or an href into workflow variables.",
 "who": "A Kotlin Multiplatform developer who needs one fact from a third-party page shown inside their app.",
 "problem": "Reading a page inside a WebView usually means one-off evaluateJavascript calls that race each other and the UI.",
 "outcome": "A workflow that returns a named variable such as a headline and its URL in a Completed event.",
 "steps": [
  "Add vitre-core to commonMain dependencies from Maven Central as dev.ggoggam.vitre:vitre-core:0.2.0.",
  "Declare a workflow with navigate, then waitFor on the element that means the page is ready.",
  "Add extract steps for the text you need, and use Source.Attribute(\"href\") for link targets.",
  "Mount a WebView, take its controller, and call WorkflowEngine(controller).run(workflow).collect.",
  "Read event.variables in the WorkflowEvent.Completed branch."
 ],
 "agent_prompt": "In the Kotlin project at <project-path>, add dev.ggoggam.vitre:vitre-core:0.2.0 from Maven Central and write a workflow that navigates to <target-url>, waits for <ready-selector>, and extracts <field-selector> into a variable. Expected output: the extracted value printed from WorkflowEvent.Completed. Verify that the Completed event contains a non-empty value for that variable.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "Vitre targets embedded WebViews on Android, iOS and desktop, and the README states that web is out of scope as a target.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "kotlin",
 "requirements": [
  "Kotlin 2.3.10 Multiplatform project (Android minSdk 24, iOS 15.0+, or desktop with JetBrains Runtime and JCEF 21)",
  "Maven Central access, which is the only setup needed for the published artifacts",
  "Compose Multiplatform if you want the optional vitre-compose UI layer"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/ggoggam-vitre/read-page-data-in-app/",
 "md": "https://dedupedai.com/use-cases/ggoggam-vitre/read-page-data-in-app/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/ggoggam-vitre--read-page-data-in-app.json",
 "api_version": "v1"
}
