How to setup mail connection?

BQ understands that there might me certain scenarios where you might wish to access your e-mail account and verify certain things while using automated tests. It therefore allows user to do so by using the email action keywords.
But in order to efficiently use those action keywords, you will have to first setup e-mail connection to the e-mail account.

Here’s how you can do so :

  1. Click on Configure on the left nav.


  2. Click on Email Connect



    The below screen will be made available to you.

     
  3. Enter the below meta-data :
    1. Variable Name
    2. Type : IMAP, POP3, SMTP
    3. IP-Address/Host Name
    4. Port
    5. Security Type : None, SSL, TLS
    6. User Name
    7. Password
  4. Click on Save.

This will establish a connection with the e-mail account.
Once the connection is established, you can use the below action keywords.

  • copyLinkWithText
  • copyMessageCount
  • copyUnreadMessageCount
  • copyMessageWithSubject
  • copyUrlAtIndex
  • copyValueFromMailSubject
  • replyToEmail
  • replyAllToEmail
  • setMailConnection
  • sendEmail
  • setSearchModeExact
  • setSearchModePartial
  • setCurrentFolder
  • verifyMessageCount
  • verifyUnreadMessageCount
  • verifySubjectExists
  • verifyLinkWithTextExist
  • verifyUrlWithTextExist
  • verifyTextExistsInMailBody

If you notice, an action keyword setMailConnection is provided. It connects the email server with the connection string.
Now, you might think that we’ve already created the connection under Email Connect, right?
You can simple call that Email connection variable here.

Suppose you created the connection named MyMail under Email Connect & you wish to use it in the test case.

  1. Use setMailConnection keyword
  2. Click on Data button
  3. Click on the datatype dropdown
  4. Select Global Variable as the datatype
  5. Click on the dropdown displayed besides the datatype field.
    You will notice that the list of created variables will be displayed
  6. Select the connection MyMail
  7. Click on Update
  8. Save the test

You are now ready to access the mail account.