CI Test Telemetry

Playwright Modular Locator Framework

Self-healing element lookup for UI test automation — a prioritized chain of locator strategies, with visibility into which one actually locked onto each element. Generated Sep 25, 2026 03:06 UTC

100%
PASS RATE

14 of 14 tests locked on · 0 failed · 0 skipped

Full suite ran in 10.77 s across 4 levels of realism — from pure-Python logic to a real, live page.

14
Total tests
4
Locator strategies exercised
5
Self-healed fallbacks
10.77 s
Total duration

Realism ladder

Same Strategy pattern, staged levels of proof

01

Unit

Strategies search a plain in-memory list — no browser at all. Proves the fallback chain and none_found reporting are correct in isolation.

5 tests 100%
02

Synthetic Browser

The same strategies, backed by a real Chromium page rendering an inline HTML snippet instead of a Python list.

2 tests 100%
03

Real Page

A public, unmodified login form. The submit button has no id, so the engine has to actually fall through to a role-based strategy to succeed.

2 tests 100%
04

Visual Match

OpenCV template matching against a screenshot — the last-resort strategy for elements with no reliable DOM attributes at all.

5 tests 100%

Self-healing spotlight

The differentiator, not just the pass/fail count

5 of 14 tests healed

Detection, not silent magic

When an element is found by anything other than the first strategy in the list, the engine logs a WARNING naming the target and which strategy ultimately recovered it. It doesn't rewrite your locators for you — it tells you the moment one has gone stale, which is the first honest step toward self-healing.

test_falls_through_to_next_strategy_when_id_is_stale exact_id → visible_text
test_warning_logged_when_locator_heals exact_id → visible_text
test_engine_falls_back_to_visible_text_when_id_is_stale[chromium] playwright_exact_id → playwright_visible_text
test_locator_engine_logs_in_on_a_real_page[chromium] playwright_exact_id → playwright_role
test_locator_engine_reports_failed_login_via_visible_text[chromium] playwright_exact_id → playwright_visible_text

Full results

14 tests · 10.77 s

Module Test Result Resolved via Duration
Unit test_exact_id_match ✓Passed primary match 1 ms
Unit test_falls_through_to_next_strategy_when_id_is_stale ✓Passed exact_id → visible_text 1 ms
Unit test_no_strategy_matches ✓Passed primary match 1 ms
Unit test_warning_logged_when_locator_heals ✓Passed exact_id → visible_text 1 ms
Unit test_no_warning_logged_when_primary_strategy_matches ✓Passed primary match 1 ms
Synthetic Browser test_engine_finds_element_via_playwright_exact_id[chromium] ✓Passed primary match 733 ms
Synthetic Browser test_engine_falls_back_to_visible_text_when_id_is_stale[chromium] ✓Passed playwright_exact_id → playwright_visible_text 3.09 s
Real Page test_locator_engine_logs_in_on_a_real_page[chromium] ✓Passed playwright_exact_id → playwright_role 3.40 s
Real Page test_locator_engine_reports_failed_login_via_visible_text[chromium] ✓Passed playwright_exact_id → playwright_visible_text 3.29 s
Visual Match test_finds_reference_image_at_its_true_position ✓Passed primary match 38 ms
Visual Match test_reports_not_found_for_unrelated_image ✓Passed primary match 11 ms
Visual Match test_missing_files_return_none_instead_of_raising ✓Passed primary match 1 ms
Visual Match test_below_threshold_match_is_treated_as_not_found ✓Passed primary match 13 ms
Visual Match test_plugs_into_modular_locator_engine_as_a_fallback_strategy ✓Passed primary match 51 ms