getVerificationUrlFromEmailData(emailData:any){
const emailBody = emailData.email_text;
const urlRegex = /(https?:\/\/[^\n]*)/;
const url = emailBody.match(urlRegex)[0];
return url
} }
getVerificationUrlFromEmailData(emailData:any){
const emailBody = emailData.email_text;
const urlRegex = /(https?:\/\/[^\n]*)/;
const url = emailBody.match(urlRegex)[0];
return url
} }
According to the error message, the value of the "emailBody" variable is undefined. However, I can’t come up with any assumptions, since you shared your own function that has nothing to do with TestCafe. I recommend that you perform step-by-step debugging to determine why your variable is undefined. If you find that the issue is related to TestCafe, feel free to share a simple runnable project that illustrates the issue.
Regards, Artem