Mailosaur logo
Mailosaur logo

How to test email and SMS with Selenium

This article shows you how to test email and test SMS using Selenium and the Mailosaur API.

What is Selenium?
A hashtag icon

Selenium is a hugely popular open-source tool that automates web browsers.

If you’ve never heard about Selenium, we’d recommend checking out the the Selenium website.

What is Mailosaur?
A hashtag icon

Mailosaur is a service that captures email and SMS messages and lets you test them, via it’s web dashboard and the Mailosaur email/SMS testing API.

If you don’t already have one, create a free account trial now, and send an email into Mailosaur first. Once you have this working, you’re ready to start testing!

1. Create an API key
A hashtag icon

Account-level API keys allow you to access all the functions described in the API reference, and have access to all the servers in your account.

To create an account-level API key, you must be an Administrator or Account Owner on the account in question.

  1. Go to the Settings page in the Mailosaur Dashboard.
  2. Go to the API Keys page.
  3. Click the Create a Key button.
  4. In the dialog that appears, enter a name for your key.
  5. When you are finished, click Create.

For more information, see our guide on managing API keys.

2. Use the guide for your programming language
A hashtag icon

Selenium supports various languages. To begin integrating email and SMS into your Selenium tests, just follow the step-by-step guide for the language that applies to your Selenium setup: