Package: rf-googlemaillibrary
GoogleMailLibraryLibrary Scope:GLOBALcreated:September 21, 2022 12:20 UTC8Author:Francisco Quinola Jr. | email:francisco.quinola@mnltechnology.comcompany:Spiralworks Technologies IncFull Documentation:https://mainsystemdev.github.io/GoogleMailLibraryContents:GoogleMailLibraryContentsIntroductionInstallationUsageGenerating DocumentationDependenciesIntroductionGoogleMailLibraryis aRobotframeworkTest Library for interfacing tests with
Google Email usingGoogle Mail API v1.InstallationOption 1Install using pypi, run:pipinstallrf-googlemaillibraryOption 2With recent version ofpip, it is possible to install directly from GitHub repository. To Install latest source
from the master branch, use this command:pipinstallgit+https://github.com/MainSystemDev/GoogleMailLibrary.gitPlease note that installation will take some time, becausepipwill
clone theGoogleMailLibraryproject to a temporary directory and then
perform the installation.UsageTo use GoogleMailLibrary in Robot Framework tests, the library needs to
first be imported using theLibrarysetting as any other library.*** Settings ***DocumentationThis is demo test script to show how GoogleMailLibrary WorksLibraryGoogleMailLibrary...scopes=['https://www.googleapis.com/auth/gmail.readonly']LibraryStringSuite SetupInitialize Email...tokenFile=path/to/token.jsonForce Tagsgmail-api*** Variables ***# Sample id# Should be a specific valid email id from an inbox from gmail to work.${email_id}183a2a567gf2db7c*** Test Cases ***Get First Email In Inbox[Documentation]Get the first email in inbox and return raw data....Please refer to the link on the datas returned for raw...https://developers.google.com/gmail/api/reference/rest/v1/users.messages#Message.FIELDS[Tags]gmail-api-1${first_email_raw}Parse First EmailLog To Console${first_email_raw}Get Recent Id In Inbox[Documentation]Get the first email id in inbox....Please refer to the link on the datas returned for raw...https://developers.google.com/gmail/api/reference/rest/v1/users.messages#Message.FIELDS[Tags]gmail-api-2${recent_message_id_in_inbox}Get First Id In InboxLog To Console\n${recent_message_id_in_inbox}Get Specific Id In Inbox[Documentation]Get the Specific email id in inbox....Please refer to the link on the datas returned for raw...expecting an argument for specific email_id...https://developers.google.com/gmail/api/reference/rest/v1/users.messages#Message.FIELDS[Tags]gmail-api-3${specific_message_in_inbox}Parse Email${email_id}Log To Console\n${specific_message_in_inbox}Delete Specific Mail[Documentation]Delete the specific email in inbox...Please refer to the link on the datas returned for raw...expecting an argument for specific email_id...https://developers.google.com/gmail/api/reference/rest/v1/users.messages/delete[Tags]gmail-api-4Delete Message${email_id}Return Email Body Content[Documentation]Get the specific email in inbox...Email format can be in plain text, rich text and html...Converts the html content to a readable text...expecting an argument for specific email_id[Tags]gmail-api-5${body_content}Return Email Body Content...                               ${email_id}Log To Console\n${body_content}Return Sender of Specific Email[Documentation]Get the specific email in inbox...Return the specific sender of email[Tags]gmail-api-6${sender}Return Sender Name${email_id}Log To Console\n${sender}Return TimeStamp of Specific Email[Documentation]Get the specific timestamp of email...Return the specific timestamp of email[Tags]gmail-api-7${timestamp}Return Email Timestamp${email_id}Log To Console\n${timestamp}Generating DocumentationTo Generate the keyword Documentation, simply run:python-mrobot.libdocGoogleMailLibrarydocumentation.htmlNote that the library must first be installed before generating a documentation.Dependencies