Exemplo n.º 1
0
        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);
        }