How to get mail data?

Hello, i am new to TestProject and i wanna make couple test for company im working atm.

On one of our steps you have to enter your mail and after that you get code on your mail. Is there a way to pause a test wait for company mail to send you code on your mail then read the code and input it in the input box? Because without the code you can’t continue on the next step. If there is a way can i do it with recorder somehow or do i have to use SDK?

Thank you for any answers and have a nice day.

Hi @Xclusive,
You can do the following:

  1. Use the ‘Open URL in New Tab’ action to open another tab.
  2. Use the ‘Switch to window’ action if needed.
  3. Log in to your email.
  4. Enter that last mail.
  5. Use the ‘Get text’ action to save the value from the email into a parameter.
  6. Use the ‘Close tab at index’ action to close the tab.
  7. Use the ‘’ action.
  8. Use the ‘Switch to window’ action if needed.

Let me know if it helps you reach that goal.

Hey, thank you for help but sadly it does not work.

My company uses Outlook, so in order to do what you suggested i first have to log in outlook which is where problems already start. I managed to open new window already signed into my outlook account but it does not fix the problem. When i use ‘‘click’’ action to get to on my mail that sends 4 digit code it shows the error that ‘‘Element was not found’’ which im guessing is some sort of security thing for microsoft against bots since it already didn’t work on “Signup” button when signing in your outlook account.

In the screenshot i used click action on the mail that sends the code and it shows the error mentioned. I hope this helps.

If you have any other suggestions i would love to try it out and thank you again for responding.

Have a nice day

@Xclusive
This indeed might be a security block.
Have you tried the same with Gmail?

No i haven’t tried with gmail, we already fixed it at work, they gave me mail with fixed code so we avoid this headache.

Thank you for taking your time to help me anyways and have a nice day :slight_smile:

Glad to know that the issue is resolved :slight_smile: