예제 #1
0
        private ActionStep ConvertToStep(AutomationStep stepData)
        {
            ActionStep step = new ActionStep();
            step.Name = stepData.Name;
            step.Description = stepData.Description;

            return step;
        }
예제 #2
0
        public void RunStep(ActionStep step)
        {
            WaitBrowserBusy();
            LoggerManager.Info("Step:{0}", step.Name);

            if (step.ActionList == null || step.ActionList.Count == 0)
            {
                return;
            }

            foreach (IAction action in step.ActionList)
            {
                LoggerManager.Debug("Start Run Action:{0}", action.ActionType);

                try
                {
                    RunAction(action);
                }
                catch (ElementNoFoundException ex)
                {
                    // report fatal
                    if (ErrorMessage != null)
                    {
                        ErrorMessage(ex.Message, ex.Action.AutomationActionData.ToString());
                    }

                    return;
                }
                catch (Exception ex)
                {
                    if (ErrorMessage != null)
                    {
                        ErrorMessage(ex.Message, string.Empty);
                    }

                    return;
                }
            }
        }