Skip to main content

Inbox Mail System Usage

The Inbox Mail System feature allows users to automatically access and interact with test emails generated during automated trace runs or manual testing.


G
Written by Georgij Lazarevski
Updated over a week ago


Note: Using this system enables you to perform parallel runs with the same email recipient on multiple traces. The legacy email step requires you to work with consecutive runs in sequence.

Inbox Mode provides a temporary email inbox using a shared username with the @mail.usetrace.com domain. Emails received by the mail.usetrace.com server are retained for approximately 1 hour, after which they are automatically deleted unless removed manually via the Email Viewer page.

Key Differences from Legacy Mode

  • Legacy mode takes the latest email it can fetch; there is no control for multiple emails for the same username/email. Emails get deleted as soon as the step is processed or when the trace fails automatically. Same username/email used in multiple traces breaks the parallel runs due to trace race conditions when we have more parallel trace runs.

  • Inbox Mode includes a Subject input field with two matching options:

    • Partial subject match (regex)

    • Exact subject match

  • The matching behavior is controlled by a checkbox option located below the Subject input field.

  • Inbox Mode email step enables parallel runs with same username/email because of the designated subject email to be processed.

Email Fetching Behavior

  • If multiple emails match the same subject, the system automatically opens the most recent email.

  • If no matching email is found, the system:

    • Refreshes the email API every 5 seconds

    • Continues polling until the configured timeout expires

    • Returns an error: “Waiting for email to arrive timed out.”

Email Viewer Capabilities

After an email is opened from the inbox, the Email Viewer allows you to:

  • Download attachments (if present)

  • Preview the message in HTML View or Text View

  • Delete the email using a confirmation dialog once testing steps are completed

Usage:

  1. Choose the Email view mode: Inbox

  2. Designate a unique username that will be your temporary address username@mail.usetrace.com

  3. Click the OPEN INBOX IN VIRTUAL BROWSER to preview the emails received to that email address after some step actions of the test that trigger sending emails to that address.

  4. Write a partial or exact match value for the Subject you want to open in the Subject input field. This will open the top-most recent email on the inbox list.

  5. After running email trace step, the email with the matching Subject details will open in an email-viewer page where you can record and use other steps like Check, Click, Variable etc.

Tips & Best Practices

  1. Delete emails after use
    To ensure the correct (latest) email is fetched in subsequent runs, always delete the email after finishing test steps in the Email Viewer.

  2. Use a Wait step when needed
    If deleting emails is not possible, add a Wait step (e.g., 30 seconds) before the Email step. This helps ensure the inbox fetches the most recent email, especially in fast or repeated executions where emails with the same subject may arrive with slight delays.


Alternative way of using the Inbox

Accessing the Inbox

Navigate URL

To open the inbox for a specific test email user, use the Navigate URL step in your trace with the following format:

Important:
Example: for accessing an email sent to testuser@mail.usetrace.com, use
https://mail.usetrace.com/public/inbox.html?to=testuser

Step-by-Step Instructions

Step 1: Add a Wait Step

Before navigating to the inbox or refreshing the inbox page, add a Wait Step to ensure the email is delivered before checking.

  • Recommended duration: 30 seconds

  • Purpose: Allows time for new emails to arrive before interacting with the inbox.

Step 2: Open the Inbox with a Navigate URL step

  • Enter the URL address format provided above the step-by-step instructions that matches your email recipient's username.

  • After the Navigate URL step, if you don't see emails yet, make sure to add a wait step (10-30seconds) & Click Step to press the “Refresh” button on the inbox page to fetch and list the latest emails in the inbox page from the email system.

Step 3: Define Manual Locator (XPath) for the Latest Email with a Click step

To open the most recent email, you’ll need to use a Click Step that targets the latest email subject.
This step requires manual locator definition using XPath.

Example XPath:

(//div[contains(@class, 'email-content') and contains(., 'Test email 1')])[1]
  • Replace "Test email 1" with a substring of the latest email subject.

  • The [1] ensures that it selects the topmost matching email (the latest one).

Step 4: Open Email Details

Once the email is clicked, you are navigated to:

email-viewer.html

In this view, you can:

  • Use Check Steps to validate the email content.

  • Click links inside the email (for verification or navigation).

  • Switch between Plain Text and HTML views.

  • Delete the email.

  • Download attachments (if available).

Example Flow Summary

  1. Wait Step: Wait 30 seconds before inbox interaction.

  2. Click Step: Define a manual XPath to open the latest email by subject name.

  3. Check/Click Steps: Validate content or perform actions in email-viewer.html.

Info: If you don't delete the emails after usage from the email-viewer page via the delete button, then the email system purges all emails automatically if the emails are older than 1 hour.

Tips & Best Practices

  • Always include a wait step before interacting with the inbox to avoid missing recent emails, or use the wait step after the Navigate url, then a wait step for 30 seconds, and a click step on the "Refresh" button to fetch the latest inbox emails.

  • Keep your XPath flexible — use partial text that uniquely identifies the latest email subject.

  • When validating content, combine check steps (for text presence) with click steps (for navigation actions).

  • Avoid using CSS selectors — stick with XPath for reliability with dynamic email content.

Did this answer your question?