Nexial Automation

Test Automation Platform for everyone!

X

webmail

The “webmail” command type represents the automation command for reading and deleting emails from webmail providers (online-only email services). At this time, the following webmail providers are supported:

Future enhancement could include supporting multiple other webmail providers. In case you want us to support any other webmail providers, please let us know via the GitHub Feature request form. It’ll help us prioritize future Nexial features.

In order to read emails, appropriate mail-provider and the inbox details need to be provided first. The section below describes how to specify the configuration settings.

Webmail Configuration Settings

Nexial supports profile-based configuration for webmail automation. One can configure multiple profiles for different webmail targets. Here are the various settings available to configure the webmail for your automation (assuming profile is MyWebMail):

data variable description
MyWebMail.provider [optional] the mail-provider used. Possible values are mailinator (default) or temporary-mail.
MyWebMail.inbox [REQUIRED] the name of the inbox (without domain name).
MyWebMail.domain [optional] For temporary-mail only. Specifies the domain used.



Mailinator

Here are the settings for targeting mailinator. Note that the .provider is optional.

The above settings will read emails from the Mailinator inbox with the specified inbox name:

Since Mailinator supports SMS messages, one can configure a burner phone number for the .inbox data variable to receive SMS messages.

Temporary-mail

Here are the settings for targeting temporary-mail.

The above settings will read emails from the temporary-mail.net inbox with the specified inbox name and the domain name temporary-mail.net as shown below:

We can extract the various links in the email using the links and the link attributes. The links contain all the links in the html file, while the link attribute is used to extract the url value corresponding to a specific label.

For example, in the below screenshot you can observe there are five web links.

  • There are two links with labels Documentation andNexiality.
  • source code url(with out a label).
  • The git and slack images which link to the Nexial source url and the Nexial slack url respectively.

  • The ${email1}.links lists all the links(urls) in the html page.
  • The [LIST(${email1}.links) => item(0)]and ${email1}.links[2] represents the first and third links in the list of links in the html page. The urls(links) related to the images(the git and the slack images in the above diagram) can be retrieved as ${email1}.links[3] and ${email1}.links[4].
  • The ${email1}.link[Documentation] and ${email1}.link[Nexiality] represents the links corresponding to the labels Documentation and Nexiality.

Output of the script


Available Commands