Example Title |
Copy Code
|
---|---|
public Test FindTestNameInFolder(SubjectNode containingFolder, String tName) { try { // Get a test in a folder by name TestFactory testF; Test objTest = null; TDFilter tFilter; List tList; String qTName = String.Empty; testF = containingFolder.TestFactory; tFilter = testF.Filter; qTName = "\"" + tName + "\""; tFilter["TS_NAME"] = qTName; tList = tFilter.NewList(); foreach (Test aT in tList) { if (aT.Name == tName) { objTest = aT; break; } } return objTest; } catch (Exception) { return null; } } |