Skip to main content

Robot Framework IMAP Mail Check Library

Project description

robotframework-imaplibrary is a Robot Framework test library to test mail validation tasks.

Installation

To install, just fetch the latest version from PyPI:.

pip install –upgrade robotframework-imaplibrary

Usage

Setup in the robotframework Settings section:

Setting Value
Library ImapLibrary

These keyword actions are available:

Open Mailbox:
    Open the mailbox on a mail server with a valid authentication:
    Arguments:
        - server:   the server name (e.g. imap.googlemail.com)
        - user:     the user name (e.g. me@googlemail.com)
        - password: the user's password

Wait for Mail:
    Wait for an incoming mail. Check the mailbox every 10 seconds
    for incoming mails until a matching email is received or the
    timeout is exceeded. Returns the mail number of the latest matching
    email.
    Arguments:
        - fromEmail: the email address of the sender (not required)
        - toEmail:   the email address of the receiver (not required)
        - timeout:   the timeout how long the mailbox shall check emails
                     in seconds (defaults to 60 seconds)

Get Links From Email:
    Finds all links in an email body and returns them

    Arguments:
        - mailNumber: is the index number of the mail to open

Open Link from Mail:
    Find a link in an email body and open the link. Returns the links' html.
    Arguments:
        mailNumber: the number of the email to check for a link
        linkNumber: the index of the link to open
                    (defaults to 0, which is the first link)

Close Mailbox:
    Close the mailbox after finishing all mail activities of a user.

Here is an example of how to use the library:

Action Argument Argument Argument Argument
Open Mailbox server=imap.googlemail.com user=mymail@googlemail.com password=mysecretpassword  
${LATEST}= Wait for Mail fromEmail=noreply@register.com toEmail=mymailalias@googlemail.com timeout=150
${HTML}= Open Link from Mail ${LATEST}    
Should Contain ${HTML} Your email address has been updated    
Close Mailbox        

License

The robotframework-imaplibrary is licensed under the Apache 2.0 License.

Project details


Release history Release notifications

History Node

0.3.0

History Node

0.2.5

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

This version
History Node

0.0.4

History Node

0.0.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
robotframework-imaplibrary-0.0.4.tar.gz (3.1 kB) Copy SHA256 hash SHA256 Source None Sep 13, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page