protected void ReportError(EnumErrorType overridingStatus, ReturnObject rc, string msg)
 {
     if (rc.Status == EnumErrorType.Failure || rc.Status == EnumErrorType.Inconclusive)
     {
         throw new BreakExecutionException(rc);
     }
 }
 protected void ReportError(ReturnObject rc, string message = "")
 {
     if (rc.Status == EnumErrorType.Failure || rc.Status == EnumErrorType.Inconclusive)
     {
         throw new BreakExecutionException(rc);
     }
 }
        protected ReturnObject PerformAction(string control, string action, string inputValue, int waitTime)
        {
            ReturnObject rc       = new ReturnObject();
            UIControl    control1 = new UIControl();

            PerformAction(control1, action, inputValue, waitTime);
            return(rc);
        }
        private ReturnObject DoSyncAction()
        {
            ReturnObject rc = new ReturnObject();

            switch (actionValues.Action)
            {
            case SyncConstants.WAITFORCONTROLREADY:
                break;

            case SyncConstants.WAITFORPROPERTYEQUAL:
                break;

            default:
                break;
            }
            return(rc);
        }
        protected ReturnObject PerformValidation(UIControl control, string validation, string expectedValue, int waitTime)
        {
            ReturnObject rc = new ReturnObject();

            //get the control from string

            //create action helper
            ActionInfo   actionInfo   = new ActionInfo(validation, expectedValue, waitTime);
            ActionHelper actionHelper = ActionHelperFactory.Create(control, actionInfo);

            actionHelper.PerformAction();

            //do required default sync

            //report and log

            return(rc);
        }
        public ReturnObject PerformAction(ObjDict objDict)
        {
            ReturnObject rc = new ReturnObject();

            foreach (var item in objDict.ControlKeys)
            {
                objDict.MoveNext();

                if (objDict.CurrentControlKey is string)
                {
                    PerformAction(objDict.CurrentControlKey.ToString(), objDict.CurrentAction, objDict.CurrentValue.ToString(), (int)objDict.CurrentWaitTime);
                }
                else if (objDict.CurrentControlKey is UIControl)
                {
                    PerformAction((UIControl)objDict.CurrentControlKey, objDict.CurrentAction, objDict.CurrentValue.ToString(), (int)objDict.CurrentWaitTime);
                }
            }

            return(rc);
        }
        private ReturnObject DoValidationAction()
        {
            ReturnObject rc = new ReturnObject();

            switch (actionValues.Action)
            {
            case (ValidateConstants.CHECKENABLED):
                CheckEnabled();
                break;

            case (ValidateConstants.CHECKEXIST):
                CheckExist();
                break;

            case (ValidateConstants.CHECKVISIBLE):
                CheckVisible();
                break;

            case (ValidateConstants.CHECKSELECTEDITEM):
                CheckSelected();
                break;

            case (ValidateConstants.CHECKSELECTEDITEMTEXT):
                CheckSelectedItemText();
                break;

            case (ValidateConstants.CHECKTEXT):
                CheckText();
                break;

            case (ValidateConstants.CHECKCONTAINTEXT):
                CheckContainText();
                break;

            case (ValidateConstants.CHECKNAME):
                CheckName();
                break;

            case (ValidateConstants.CHECKCONTAINSNAME):
                CheckContainsName();
                break;

            case (ValidateConstants.CHECKVALUE):
                CheckValue();
                break;

            case (ValidateConstants.CHECKHELPTEXT):
                CheckHelpText();
                break;

            case (ValidateConstants.CHECKTITLE):
                CheckTitle();
                break;

            case (ValidateConstants.CHECKDISPLAYTEXT):
                CheckDisplayText();
                break;

            case (ValidateConstants.CHECKCONTAINDISPLAYTEXT):
                CheckContainsDisplayText();
                break;

            case (ValidateConstants.CHECKHEIGHT):
                CheckHeight();
                break;

            case (ValidateConstants.CHECKWIDTH):
                CheckWidth();
                break;

            case (ValidateConstants.CHECKROWCOUNT):
                CheckRowCount();
                break;

            case (ValidateConstants.CHECKTOGGLE):
                CheckToggle();
                break;

            case (ValidateConstants.CHECKINDETERMINATE):
                CheckIndeterminate();
                break;

            case (ValidateConstants.CHECKCHILDCOUNT):

                break;

            case (ValidateConstants.CHECKEXPANDED):
                CheckExpanded();
                break;

            case (ValidateConstants.CHECKTOPPARENT):
                CheckTopParent();
                break;

            case (ValidateConstants.CHECKRESIZABLE):
                CheckResizable();
                break;

            case (ValidateConstants.CHECKSELECTED):
                CheckSelected();
                break;

            case (ValidateConstants.CHECKREADONLY):
                CheckReadOnly();
                break;

            case (ValidateConstants.CHECKCOMBOITEMEXISTENCE):
                CheckComboItemExistance();
                break;

            case (ValidateConstants.CHECKCOMBOITEMSCOUNT):
                CheckComboItemsCount();
                break;

            case (ValidateConstants.CHECKTOOLTIPTEXT):
                CheckToolTipText();
                break;

            case (ValidateConstants.CHECKHEADER):
                CheckHeader();
                break;

            case (ValidateConstants.CHECKLISTITEMSCOUNT):
                CheckListItemCount();
                break;

            case (ValidateConstants.CHECKLISTITEMNAMES):
                CheckListItemNames();
                break;

            case (ValidateConstants.CHECKACCESSIBLEDSCIPTION):
                CheckAccessibleDescription();
                break;

            case (ValidateConstants.CHECKEDITABLE):
                CheckEditable();
                break;

            case (ValidateConstants.CHECKROWINDEX):
                CheckRowIndex();
                break;

            case (ValidateConstants.CHECKPRESSED):
                CheckPressed();
                break;

            case (ValidateConstants.CHECKFOCUS):
                CheckFocus();
                break;

            case (ValidateConstants.CHECKSTATE):
                CheckState();
                break;

            default:
                //Report error here
                break;
            }

            return(rc);
        }
        private ReturnObject DoAction()
        {
            ReturnObject rc = new ReturnObject();

            switch (actionValues.Action)
            {
            case (ActionConstants.CLICK):
                this.Click();
                break;

            case (ActionConstants.MIDDLECLICK):
                this.MiddleClick();
                break;

            case (ActionConstants.DOUBLECLICK):
                DoubleClick();
                break;

            case (ActionConstants.RIGHTCLICK):
                RightClick();
                break;

            case (ActionConstants.SELECT):
                this.Select();
                break;

            case (ActionConstants.SELECTCOMBOITEMBYCLICK):
                this.SelectComboItemByClick();
                break;

            case (ActionConstants.SELECTITEMBYTEXT):
                SelectItemByText();
                break;

            case (ActionConstants.SELECTITEMBYINDEX):
                SelectItemByIndex();
                break;

            case (ActionConstants.SETVALUE):
                SetValue();
                break;

            case (ActionConstants.SENDKEYS):
                SendKeys();
                break;

            case (ActionConstants.TOGGLETREEITEM):
                ToggleTreeItem();
                break;

            case (ActionConstants.TOGGLE):
                Toggle();
                break;

            case (ActionConstants.MOUSESCROLL):
                MouseScroll();
                break;

            case (ActionConstants.EXPAND):
                Expand();
                break;

            case (ActionConstants.COLLAPSE):
                Collapse();
                break;

            case (ActionConstants.DRAG):
                Drag();
                break;

            case (ActionConstants.DROP):
                Drop();
                break;

            case (ActionConstants.MIDDLEDRAG):
                MiddleDrag();
                break;

            case (ActionConstants.MIDDLEDROP):
                MiddleDrop();
                break;

            case (ActionConstants.MOVE):
                Move();
                break;

            case (ActionConstants.ABSOLUTEMOVE):
                AbsoluteMove();
                break;

            case (ActionConstants.MOUSEMOVE):
                MouseMove();
                break;

            case (ActionConstants.DATEASSTRING):
                DateAsString();
                break;

            case (ActionConstants.HOVER):
                Hover();
                break;

            case (ActionConstants.GETPROPERTYVALUE):
                GetPropertyValue();
                break;

            case (ActionConstants.PRESSANDHOLD):
                PressAndHold();
                break;

            case (ActionConstants.KEYDOWN):
                KeyDown();
                break;

            case (ActionConstants.KEYUP):
                KeyUp();
                break;

            case (ActionConstants.SELECTITEMBYVALUE):
                SelectItemByValue();
                break;

            case (ActionConstants.GETCELLDATA):
                GetCellData();
                break;

            default:
                //update failure
                break;
            }
            return(rc);
        }
 public BreakExecutionException(ReturnObject rc)
     : base()
 {
     this.rc = rc;
 }