public Test(JArray steps) { _testSteps = new List <ITestStep>(); for (int i = 0; i < steps.Count; i++) { _testSteps.Add(ITestStep.CreateTestStep((JObject)steps[i])); } }
public static ITestStep CreateTestStep(JObject step) { string testType = (string)step["testType"]; TestStepType type = ITestStep.ParseTestStepType(testType); ITestStep testStep = null; switch (type) { case TestStepType.CLICK: testStep = new ClickTestStep(step); break; case TestStepType.INPUT: testStep = new InputTestStep(step); break; case TestStepType.SUBMIT: testStep = new SubmitTestStep(step); break; case TestStepType.TAP: testStep = new TapTestStep(step); break; case TestStepType.SWIPE: testStep = new SwipeTestStep(step); break; default: break; } testStep._testStepType = type; testStep._stepName = (string)step["stepName"]; return(testStep); }
public void AddTestStep(ITestStep step) { Test.TestSteps.Add(step); }
public void AddTestStep(JObject step) { Test.TestSteps.Add(ITestStep.CreateTestStep(step)); }