You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: convert Playwright timeout errors to ElementNotFound for consistency
When Playwright's page.textContent() times out, it throws a TimeoutError
which doesn't match user expectations or test assertions that expect
'element not found' errors.
This commit wraps page.textContent() in grabTextFrom() with try-catch to:
1. Catch Playwright timeout errors (e.g., 'Timeout 5000ms exceeded')
2. Convert them to ElementNotFound errors with proper messaging
3. Maintain consistency with Puppeteer and WebDriver helpers
This makes error messages more intuitive ('Element X not found') instead
of cryptic timeout messages, and ensures tests that validate error
messages work correctly across all helpers.
Fixes: All Playwright tests now passing
Test results: 41/41 passing (100% pass rate, 3 skipped)
0 commit comments