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 :
Click on Configure on the left nav.
Click on Email Connect
The below screen will be made available to you.Enter the below meta-data :
Variable Name
Type : IMAP, POP3, SMTP
IP-Address/Host Name
Port
Security Type : None, SSL, TLS
User Name
Password
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.
Use setMailConnection keyword
Click on Data button
Click on the datatype dropdown
Select Global Variable as the datatype
Click on the dropdown displayed besides the datatype field.
You will notice that the list of created variables will be displayedSelect the connection MyMail
Click on Update
Save the test
You are now ready to access the mail account.
You can also create the mail connection directly under setMailConnection keyword in the below format :
Email Connection String format : Type | Ip-Address/Host Name | Port | Security Type | User Name | Password
Suppose the Email Connect variable created is EmailConn1 with values IMAP | 192.9.9.9 | 9999 | abc@defgh.com | xxxxxxxxsetMailConnection: <Email Connection String : EmailConn1>
Connects the email server with connection string - IMAP | 192.9.9.9 | 9999 | abc@defgh.com | xxxxxxxx
0 Comments