How to send test log details via email through script?
I have a requirement to create a script to cover few test cases.The script has to send test log details to certain number of people via email after each execution without manual intervention.
Can any of you suggest an efficient way to meet this requirement?
Thanks in advance!
Re: How to send test log details via email through script?
This is the sample script for giving you an idea how to implement above task if you have outlook installed on your machine.This script uses outlook object model to send mail.Outlook displays
a security alert if some external program send a mail using it. So if we are placing the automation
code in robot then robot will be unable to click
yes button on the security warning window.
so i am placing the code for sending mail in a vbs
file and run this file using wscript.
place the following code in Notepad and save the file as "C:\Test1.vbs" file:
Set oOutlookApp = CreateObject("Outlook.Application")
Set oOutlookMessage = oOutlookApp.CreateItem(0)
.To = WScript.Arguments(0)
.Subject = WScript.Arguments(1)
.Body = WScript.Arguments(2)
Place the following code in robo:
Dim intResult as Integer
Dim strTo as String
Dim strSubject as String
Dim strBody as String
Dim strAttachmentPath as String
Dim strOutLookScriptPath as string