playwright-excel
Playwright Excel Integration
Overview
Convert Playwright codegen scripts into Excel-driven automations with centralized config and required MCP validation.
Environment
- Use the
playwrightconda environment. - Before running any Python command, run:
conda run -n playwright python -c "import sys; print(sys.executable)" - Do not create or activate any venv or
.venv.
Inputs
- Playwright codegen script path
- Excel
.xlsxpath - Mapping lines:
"hardcoded_value" -> Excel[Sheet][FilterCol==FilterVal][DataCol] - Optional override:
PLAYWRIGHT_TARGET_SUBJECT
Workflow
- Analyze the Playwright script and the Excel structure (sheets, columns, sample rows).
- Detect hardcoded
.fill()values and confirm that each has a mapping; request clarification for mismatches. - Ensure dependencies in the
playwrightconda env (preferconda install -n playwright, fall back toconda run -n playwright pip install). - Create or update
config.yamlusing centralized control (paths, patterns, column definitions, constants, tunables, shared texts). - Modify the Playwright script:
- Add a config loader and an Excel loader (polars; see
references/excel-loading.md). - Replace hardcoded values with
data[...].
- Add a config loader and an Excel loader (polars; see
- Always run Playwright MCP validation; if MCP is not running, start it from this repo before continuing (see
references/mcp-validation.md). - When refactoring existing pipelines/logic, generate outputs and compare MD5 checksums with reference files (see
references/md5-validation.md). - Run the updated script with
conda run -n playwright python.
References
references/excel-loading.mdreferences/mcp-validation.mdreferences/md5-validation.mdreferences/examples.md
More from rukkha1024/elderly-balance-assessment
excel-vba-modifier
Safely modify Excel VBA code using xlwings. Checks Trust Center permissions, reads/writes modules, and runs test macros. Always creates backups before modifications.
19excel-backup-manager
Create, manage, and restore Excel file backups with automatic timestamps. Use before modifying Excel files to ensure data safety and enable rollback if needed.
12excel-inspector
Inspect Excel file structure (sheets, data types, VBA code) to help AI understand the workbook before writing code. Use when you need to understand an Excel file's schema, analyze data structure, or extract VBA code for modification.
9excel-na-utils
Helper functions for NA/missing value handling in Excel data. Provides Python and VBA implementations following CLAUDE.md NA handling guidelines.
8