Browser Canvas Testing
Enables precise interaction and visual verification for HTML canvas-based applications and games using native browser tools.
This skill provides specialized implementation patterns for interacting with HTML5 canvas elements, which are typically invisible to standard DOM-based automation tools. It offers validated coordinate conversion formulas for game engines like Phaser 3, allows for precise mouse and keyboard interactions via Playwright, and establishes best practices for visual state verification using direct frame buffer screenshots. This is essential for developers working on WebGL, 2D games, or complex data visualizations where standard element selectors fail to capture internal state.
Características Principales
01Coordinate conversion logic from game-space to CSS page coordinates
02Playwright mouse API integration for precise canvas object interaction
03Visual verification patterns using frame buffer screenshots
04Render-state detection to ensure canvas readiness before interaction
05Support for multiple scaling modes including FIT and RESIZE
062 GitHub stars
Casos de Uso
01Verifying visual game states when DOM-based accessibility trees return empty
02Interacting with UI elements inside complex canvas data visualizations
03Automated end-to-end testing for Phaser 3 or WebGL-based browser games