How sangcnguyen/image-locator-demo works
Project type and purpose
• This is an open-source automation demo/tool written in Python.
• Its goal is to automatically click buttons on an HTML5 canvas-based online calculator by combining Playwright (browser automation) and OpenCV (template matching).
File structure
• Top-level files:
• calculator_test.py – the single entry-point script
• input/ – directory holding template images for each calculator button
• pyproject.toml – dependency and metadata declaration
• calculator_test.py is both your controller and glue code that invokes Playwright and OpenCV APIs.
• No separate “frontend” or “backend” folders—this is a standalone client-side automation tool.
README for additional insights
• Confirms dependencies: Python 3.13+, Playwright, OpenCV
• Usage: fetch remote calculator webpage, search for button images in input/, then simulate clicks
Detail
• Initialization (browser launch), looping logic, and cleanup (browser close).
• Error-handling or retry steps if template matching fails.