# Playwright Locator Drift Checker Local source edition 1.0.0. Compare two UI element inventories and generate reusable Playwright locators that uniquely identify the same target in both snapshots. ## Run locally Extract the complete ZIP. Use Python 3.12 from a terminal in the extracted directory. The tool uses the Python standard library. python run.py example.json results Use a new output folder for each run. Start with example.json and replace its synthetic values with your own data. Preserve field names, types and units. Files and reports are processed on your computer. ## Inputs Supply baseline and candidate arrays (1–500 visible elements in the same page scope), plus target keys from the baseline. Every element needs a stable key supplied by you. Provide role and normalized accessible name, or testId from data-testid. Supports common controls, headings, named regions, table roles and navigation. Use the same keys for matched controls in both inventories. ## Results Download LOCATORS.mjs and DRIFT.csv. Import the locators Map, then call locators.get(key)(page). Unique role/name pairs have precedence over unique test IDs. Match counts are calculated over supplied inventories. Missing targets, changed descriptions and collisions go to review. The results folder includes summary.json and the output files produced by this input. The sample produces: LOCATORS.mjs, DRIFT.csv. ## Español · Verificador de selectores de Playwright Compara dos inventarios de interfaz y genera localizadores que identifican de forma inequívoca el mismo elemento. Extrae el ZIP completo y abre una terminal en esa carpeta con Python 3.12. El programa usa la biblioteca estándar de Python. Ejecuta: python run.py example.json resultados Copia example.json para preparar tus datos. Conserva los nombres y tipos de los campos, usa una carpeta de salida nueva y consulta summary.json junto con los archivos generados. La descripción detallada de los campos está en inglés. The included LICENSE covers use and modification for your own personal and commercial projects. This edition includes its source and can run locally after setup.