Runbook: Playwright Scenario Failed
Test Failure Due to Multiple Matching Elements with Similar Text
Alert Details
- Alert Name:
Tenki Production - App Can Login - Severity: P2
- Team: Frontend
- Last Updated: 2025-09-08
Symptoms
- should allow entering email and password
Quick Diagnostics
kubectx tenki-prod-apps
Resolution Steps
1. Immediate Mitigation (5-10 mins)
- checked staging and production if I can successfully login - seems to be working on my end upon testing
- ran
kubectx tenki-prod-appsand ran logs from a namespace - everything is inRunningstatus
2. Root Cause Analysis (10 mins)
- The test failed due to a strict mode violation in Playwright.
- locator detected multiple
Projectsin the code, and it didn’t know which one to interact with. - Playwright expects a single unique element when using
.toBeVisible()in strict mode.
3. Fix Implementation / Possible Resolution
- Add a unique internal ID to the correct element so the test can reliably target it without confusion from similar elements.
- Update the test to match exact text to avoid picking up similar elements.
4. Verification
- Successful test when i ran the scenario in
Monitors
Prevention
- ensure a proper unique id for dynamic or conditionally rendered UI elements
Related Runbooks
Not Applicable