Skip to main content

IMAP email testing library for Robot Framework

==============================================

Docs

Introduction


Note: This is a fork of

https://github.com/rickypc/robotframework-imaplibrary

ImapLibrary2 is a IMAP email testing library for [Robot

Framework](http://goo.gl/lES6WM).

More information about this library can be found in the [Keyword

Documentation](https://lasselindqvist.github.io/robotframework-imaplibrary2/doc/ImapLibrary2.html).

If you are interested to contribute back to this project, please see

Contributing section.

Examples

*** Settings ***

Library    ImapLibrary2



*** Test Cases ***

Email Verification

    Open Mailbox    host=imap.domain.com    user=email@domain.com    password=secret

    ${LATEST} =    Wait For Email    sender=noreply@domain.com    timeout=300

    ${HTML} =    Open Link From Email    ${LATEST}

    Should Contain    ${HTML}    Your email address has been updated

    Close Mailbox



Multipart Email Verification

    Open Mailbox    host=imap.domain.com    user=email@domain.com    password=secret

    ${LATEST} =    Wait For Email    sender=noreply@domain.com    timeout=300

    ${parts} =    Walk Multipart Email    ${LATEST}

    :FOR    ${i}    IN RANGE    ${parts}

    \\    Walk Multipart Email    ${LATEST}

    \\    ${content-type} =    Get Multipart Content Type

    \\    Continue For Loop If    '${content-type}' != 'text/html'

    \\    ${payload} =    Get Multipart Payload    decode=True

    \\    Should Contain    ${payload}    your email

    \\    ${HTML} =    Open Link From Email    ${LATEST}

    \\    Should Contain    ${HTML}    Your email

    Close Mailbox

Installation


Using pip

The recommended installation method is using

pip:

pip install robotframework-imaplibrary2

The main benefit of using pip is that it automatically installs all

dependencies needed by the library. Other nice features are easy

upgrading and support for un-installation:

pip install --upgrade robotframework-imaplibrary2

pip uninstall robotframework-imaplibrary2

Notice that using --upgrade above updates both the library and all its

dependencies to the latest version. If you want, you can also install a

specific version:

pip install robotframework-imaplibrary2==x.x.x

Proxy configuration

If you are behind a proxy, you can use --proxy command line option or

set http_proxy and/or https_proxy environment variables to configure

pip to use it. If you are behind an authenticating NTLM proxy, you may

want to consider installing CNTML to handle

communicating with it.

For more information about --proxy option and using pip with proxies

in general see:

Manual installation

If you do not have network connection or cannot make proxy to work, you

need to resort to manual installation. This requires installing both the

library and its dependencies yourself.

gpg --keyserver pgp.mit.edu --search-keys D1406DE7
  • Select the number from the list to import the public key

  • Verify the package against its PGP signature:

gpg --verify robotframework-imaplibrary2-x.x.x.tar.gz.asc robotframework-imaplibrary2-x.x.x.tar.gz
  • Extract each source distribution to a temporary location.

  • Go to each created directory from the command line and install each

    project using:

python setup.py install

If you are on Windows, and there are Windows installers available for

certain projects, you can use them instead of source distributions. Just

download 32bit or 64bit installer depending on your system, double-click

it, and follow the instructions.

Directory Layout


doc/

: Keyword documentation

src/

: Python source code

test/

: Test files

utest/

:   Python unit test

Usage


To write tests with Robot Framework and ImapLibrary, ImapLibrary must be

imported into your Robot test suite.

*** Settings ***

Library    ImapLibrary2

See Robot Framework User Guide for more

information.

More information about Robot Framework standard libraries and built-in

tools can be found in the [Robot Framework

Documentation](http://goo.gl/zy53tf).

Building Keyword Documentation


The Keyword Documentation can be found online,

if you need to generate the keyword documentation, run:

make doc

or


python -m robot.libdoc src/ImapLibrary2 doc/ImapLibrary2.html

Run Unit Tests, and Test Coverage Report


Test the testing library, talking about dogfooding, let's run:

make test

Deploying to Pypi


python setup.py sdist bdist_wheel

twine upload dist/*

Contributing


If you would like to contribute code to Imap Library project you can do

so through GitHub by forking the repository and sending a pull request.

When submitting code, please make every effort to follow existing

conventions and style in order to keep the code as readable as possible.

Please also include appropriate test cases.

That's it! Thank you for your contribution!

License


Copyright (c) 2015-2016 Richard Huang.

This library is free software, licensed under: [Apache License, Version

2.0](https://goo.gl/qpvnnB).

Documentation and other similar content are provided under [Creative

Commons Attribution-NonCommercial-ShareAlike 4.0 International

License](http://goo.gl/SNw73V).

Release files for robotframework-imaplibrary2 0.4.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robotframework-imaplibrary2 0.4.11
File Size Uploaded
robotframework_imaplibrary2-0.4.11.tar.gz 72.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-imaplibrary2 0.4.11
File Interpreter ABI Platform
robotframework_imaplibrary2-0.4.11-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 89.0 kB

Release files / robotframework_imaplibrary2-0.4.11.tar.gz

Download URL robotframework_imaplibrary2-0.4.11.tar.gz
Size 72.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3c6e48b8f6a5c26e014f6fc83fafb75a3d973b59edcfc0b76f08fe7687b6b14f
BLAKE2b-256 checksum
How to use checksums
50eb1bddfb1c132a5412c0f4e0cd484980369c21182e15fbf7f908c3666f7ad0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.7

Release files / robotframework_imaplibrary2-0.4.11-py2.py3-none-any.whl

Download URL robotframework_imaplibrary2-0.4.11-py2.py3-none-any.whl
Size 16.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
38d104115497f8c94458c3cda43bdd41774345a62386369646e2d4a9d1766c72
BLAKE2b-256 checksum
How to use checksums
dbfa6fd164c7c34a6a982ba283209fa9b2880964a17d5095dc44fcdb21f2ea45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.4.11 This release

2 release files

0.4.10

1 release file

0.4.9

1 release file

0.4.8

1 release file

0.4.7

2 release files

0.4.6

2 release files

0.4.5

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.8

2 release files

0.3.7

1 release file

0.3.6

2 release files

0.3.5

1 release file

0.3.4

2 release files

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page