I used to be utilizing under code to obtain attachments for take a look at instances on the HP ALM TestLab
folder,
However then I discover out that attachments could be obtainable on the step degree too.
So is there any technique to obtain attachments for take a look at steps?
I attempted with altering 2nd line to
TDAPIOLELib.StepFactory tsTestFact = tDConnection.StepFactory;
But it surely was not working.
public void DownloadTestAttachments_FromVB_TestLab()
{
String AttachmentDownloadPath = @"C:temp";
TDAPIOLELib.TSTestFactory tsTestFact = tDConnection.TSTestFactory;
TDAPIOLELib.Checklist tsTestList = tsTestFact.NewList("");
TDAPIOLELib.AttachmentFactory attFact;
TDAPIOLELib.Checklist attList;
Console.WriteLine("Downloading attachments for the Exams : " + AttachmentDownloadPath);
strive
{
foreach (TDAPIOLELib.TSTest tsItem in tsTestList)
{
if (tsItem.HasAttachment == true)
{
attFact = tsItem.Attachments;
attList = attFact.NewList("");
foreach (TDAPIOLELib.Attachment attItem in attList)
{
attItem.Load(true, AttachmentDownloadPath + "" + attItem.Title);
}
}
}
}
catch (Exception x)
{
Console.WriteLine(x.ToString());
}
}