How to send QTP test results to an email...(with out using
Quality Center)?

Answer Posted / allan

''' use Raj's code above (#5) modifying this line
If (Attachment <> "") Then
Mail.Attachments.Add(Attachment)
End If
'''

set listattach = wildFileList(".*4.*jpg")


for each n in listattach
Mail.Attachments.Add(n)
next 'n

Function wildFileList(regx) ', fext)
'step 1 string list of filenames
Dim fso, tmp, tmp1, folder, File, regEx, Match, Matches, n,
fext
fext = right(regx,3)
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.getfolder(".")
For Each File in folder.Files
If fso.GetExtensionName(File)= fext Then 'regx & fext
tmp = File & vbcrlf & tmp 'regx & fext & vbcrlf & tmp
End If
Next
'step 2 exec regex on raw string
Set regEx = New RegExp ' Create a regular expression.
regEx.Pattern = regx ' Set pattern.
regEx.IgnoreCase = True ' Set case insensitivity.
regEx.Global = True ' Set global applicability.
Set Matches = regEx.Execute(tmp) ' Execute search.
set wildFileList = Matches

End Function

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

QTP script is not working on other's machine..

1537


i am looking job in perfomance testing using Loadrunner any one help me a project plz......?(Chandana) chs_29@rediffmail.com

1462


On what document base Descriptive programming is written if build is not yet ready ?

873


what is Property......End Property loop? how to write sript for it in QTP

1893


How many types of recording modes in qtp?

586






With what extension you can save the list of tests in a file to run in test batch runner?

563


How to capture a window in QTP?

1525


what is description object?

1595


What is system testing and what are the different types of tests you perform in system testing?

600


Hi, I have 2 dropdown listboxes called region and city/area. It needs to select one region(Santa Clara) and one city/Area (Sunnyvale).So I put this in the for loop and I am storing the Items in the variable called itemname. The regions value will get changed,so I used reg expression for this regions. This is my code Browser("MLSListings.com").Page("MLSListings.com").Link("» County/Area").Click Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Check CheckPoint("regions") ListSize=Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetTOProperty("items count") For i = 1 To ListSize-1 Itemname =Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetItem(i+1) Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Select Itemname ................. If I run the script,I am getting the following error, Cannot identify the specified item of the regions object. Confirm that the specified item is included in the object's item collection. Any Help? Thank you, Uma

1345


What is the difference in testing a client-server application and a web application?

581


How to use Environment parameterization? Explain with an example.

1481


What is object spy in quicktest professional?

619


• What type of testing questions will be asked for 2+ yrs exp people in interview?

1257


How many types of recording modes are there?

594