How to write a test case that requires TestComplete to access and retrieve text from an e-mailSOLVED
How to write a test case that requires TestComplete to access and retrieve text from an e-mail
I am currently working on a keyword test that needs to provide a verification code from an e-mail address in order to login to my site. I originally had this test case set up to navigate to google gmail and read the e-mail, but it no longer appears to be working. I suspect there is a better approach to dealing with this scenario since it relies heavily on a 3rd party (Google). I am open to using a different e-mail (ie. Microsoft Outlook), but I would like to know if there is a best practice for handling these situations where MFA verification codes are required to login/verify e-mail.
Solved! Go to Solution.
The best is to use a mail system having the option to automatically save newx email as text file in specified folder. Thus you can simply parse a text file on disk to have your code.
On Outlook you have sone addins which does that but you must buy it.
Another solution is to use REST API of Outlook to get your mail yourself and analyse the mailItem element.
Others solutions implying GUI aren't reliable.
Un sourire et ça repart
Thank you very much!
I have a similar issue. I was using outlook, and it was mostly accurate, however, I would be interested in a more robust solution. Would you mind sharing how you solve this using the outlook rest-api and which requests worked for you.