Forum Discussion

BTscott's avatar
BTscott
Contributor
4 years ago
Solved

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 gm...
  • BenoitB's avatar
    4 years ago

    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.

    https://docs.microsoft.com/fr-fr/graph/api/resources/mail-api-overview?view=graph-rest-1.0

     

    Others solutions implying GUI aren't reliable.