Testing Angular Components by Properties with Playwright
typescript
dev.to
Most Angular E2E tests look like this: await page.locator('[data-testid="submit-btn"]').click(); await page.locator('.user-card:nth-child(2) h2').textContent(); You end up fighting CSS specificity and fragile DOM structure instead of testing Angular behavior. What if you could do this instead? await page.locator('angular=app-button[label="Submit"]').click(); await page.locator('angular=app-user-card[user.role="admin"]').textContent(); That's exactly what @playwright-labs/select