OTP Verification in Playwright Without Regex
Every developer who has written a Playwright test for OTP verification has written this line:
const otp = email.body.match(/\b\d{6}\b/)?.[0];
It works. Until it doesn't.
The email body changes format
zerodrop.hashnode.dev4 min read