using OpenTap; namespace AddInPlugin { public static class TestStepHelper { public static ITestStep GetPreviousStep(this ITestStep step) { var parentList = step.ParentList; if (parentList == null || parentList.Count <= 0) { return null; } int index = parentList.IndexOf(step); if (index == 0) { return null; } return parentList[index - 1]; } public static ITestStep GetNextStep(this ITestStep step) { var parentList = step.ParentList; if (parentList == null || parentList.Count <= 0) { return null; } int index = parentList.IndexOf(step); if (index == parentList.Count - 1) { return null; } return parentList[index + 1]; } } }