File tree Expand file tree Collapse file tree
extension/templates/platforms Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -254,3 +254,29 @@ If step 2 of a non-first scenario is `fill username`, but the app is already on
254254| No wait after navigate | App not ready, elements not yet rendered | Always ` wait 3000 ` after navigate |
255255| Asserting SnackBar text | Flaky SnackBar already dismissed | Assert permanently visible widget text |
256256| Semantics label OVERRIDING hintText | Wrong hint selector | Check which label/hint is effective |
257+
258+ ---
259+
260+ ## TEN: Page Coordinate Cache (Automatic — No Blueprint Changes Needed)
261+
262+ The engine automatically manages a persistent page coordinate cache at ` testpilot/.page_cache.json ` .
263+
264+ ** How it works:**
265+
266+ | Run | What happens |
267+ | -----| -------------|
268+ | First run on a new page | Engine takes a screenshot + calls AI to locate elements → coordinates saved to cache |
269+ | Subsequent runs on same page | Engine dumps UI tree → computes fingerprint → cache hit → ** reuses coordinates, skips screenshot + AI** |
270+ | Page UI changes | Fingerprint mismatch → re-analyzes → overwrites that page's cache entry |
271+
272+ ** Cache validation rules:**
273+ - Validated by: device screen resolution + ` app_package ` (or ` bundle_id ` for iOS)
274+ - If device or package changes: old cache is discarded automatically
275+ - Cache file location: ` testpilot/.page_cache.json ` (auto-created next to the blueprint file)
276+
277+ ** What this means for blueprints:**
278+ - You do NOT need special steps to "enable" or "update" the cache — it is fully automatic
279+ - First test run is slower (AI analysis per new page); subsequent runs are faster (cache reuse)
280+ - The cache persists across multiple test runs and across ALL blueprint files in the same ` testpilot/ ` directory
281+ - To force a full re-analysis (e.g. after major UI redesign): delete ` testpilot/.page_cache.json `
282+ - ** Do not gitignore ` .page_cache.json ` ** — keeping it in source control lets teammates reuse the same coordinates without re-running AI analysis
Original file line number Diff line number Diff line change @@ -274,3 +274,29 @@ If step 2 of a non-first scenario is `fill tf_username`, but the app is already
274274| ` .sheet() ` without wait 800 | Animation incomplete, elements inside not ready | Add ` wait 800 ` after trigger |
275275| ` base_url ` set to bundle_id | Engine confused | ` base_url ` must be ` "" ` |
276276| Asserting ` .alert() ` text | Alert may already be dismissed | Assert persistent Text/Label widgets |
277+
278+ ---
279+
280+ ## TEN: Page Coordinate Cache (Automatic — No Blueprint Changes Needed)
281+
282+ The engine automatically manages a persistent page coordinate cache at ` testpilot/.page_cache.json ` .
283+
284+ ** How it works:**
285+
286+ | Run | What happens |
287+ | -----| -------------|
288+ | First run on a new page | Engine takes a screenshot + calls AI to locate elements → coordinates saved to cache |
289+ | Subsequent runs on same page | Engine dumps UI tree → computes fingerprint → cache hit → ** reuses coordinates, skips screenshot + AI** |
290+ | Page UI changes | Fingerprint mismatch → re-analyzes → overwrites that page's cache entry |
291+
292+ ** Cache validation rules:**
293+ - Validated by: device screen resolution + ` bundle_id `
294+ - If device or bundle ID changes: old cache is discarded automatically
295+ - Cache file location: ` testpilot/.page_cache.json ` (auto-created next to the blueprint file)
296+
297+ ** What this means for blueprints:**
298+ - You do NOT need special steps to "enable" or "update" the cache — it is fully automatic
299+ - First test run is slower (AI analysis per new page); subsequent runs are faster (cache reuse)
300+ - The cache persists across multiple test runs and across ALL blueprint files in the same ` testpilot/ ` directory
301+ - To force a full re-analysis (e.g. after major UI redesign): delete ` testpilot/.page_cache.json `
302+ - ** Do not gitignore ` .page_cache.json ` ** — keeping it in source control lets teammates reuse the same coordinates without re-running AI analysis
You can’t perform that action at this time.
0 commit comments