Skip to main content

Semantic intent-based self-healing test locators for QE and test automation

Project description

CANVAS

Context-Aware Navigation and Visual Anchoring System for Selectors

An open source research prototype for semantic intent-based self-healing test locators, built for the QE and test automation community.

Why CANVAS

Existing self-healing tools use attribute-based matching — CSS selectors, XPath, element IDs, class names. These break whenever a UI undergoes structural redesign, even when the element's function is unchanged.

CANVAS takes a different approach: semantic intent anchoring. At record time it encodes what an element does — its role, accessible label, workflow position, and surrounding context — into a dense vector using a local sentence-transformers model. At runtime it embeds live DOM candidates and finds the nearest semantic match, then gates the decision:

  • Auto-heal if confidence is high enough
  • Request human confirmation if confidence is in a grey zone
  • Fail explicitly if no confident match exists

This means a "Submit Order" button that moves from a sidebar to a modal, or gets its ID changed from #btn-submit to #cta-primary, can still be found — because its intent is preserved even when its address is not.

Status

All 4 phases complete. The core pipeline (descriptor, embedder, confidence-gated resolver) is implemented and tested, and the adversarial test suite covering DOM restructuring, attribute churn, semantic paraphrase, and false-positive detection is in place — all tests passing.

Roadmap

Phase Name Status
1 Semantic Element Descriptor Complete
2 Intent Embedding Complete
3 Confidence-Gated Resolver Complete
4 Adversarial Testing Complete

Structure

canvas/         — core source code
  descriptor.py — DOM element descriptor extraction
  embedder.py   — sentence-transformers embedding pipeline
  resolver.py   — confidence-gated semantic resolver + SQLite intent store
tests/          — unit tests and adversarial test scenarios
docs/           — technical documentation

Quick Start

pip install -r requirements.txt
python -m playwright install chromium
python -m pytest tests/ -v

Contributing

CANVAS is in early prototype stage. Community feedback, issues, and pull requests are welcome once Phase 4 (adversarial testing) is complete. Watch the repo or open a discussion if you want to get involved earlier.

License

MIT — see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

canvas_heal-0.1.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

canvas_heal-0.1.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file canvas_heal-0.1.0.tar.gz.

File metadata

  • Download URL: canvas_heal-0.1.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for canvas_heal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8dcfd39f517ef0517c0ae9f1d90ccbfff58fddbc2a9db942d7e870cd5f91ad95
MD5 2d77febb5822f4bf80f048f2869bf8fd
BLAKE2b-256 8bf7d4da13f312a232b494f395519cbc490168f8747e7a7e52ff50b3b1ebcdfc

See more details on using hashes here.

File details

Details for the file canvas_heal-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: canvas_heal-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for canvas_heal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7676db49df936f783531b52135a18947506eb4e31e7b67528c762e1681c44e73
MD5 b8bafe0a9da41b30c6c2628e4e540db3
BLAKE2b-256 b5775cc2f7b0c1cfdb6e89b9bdad024ce7987268ffb3be45daa88870d52507ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page