public void ClickResetButton(ATElementStruct whichResetButton = null)
        {
            var resetButton = GetMasterPlusMainWindow().GetElementFromChild(MPObj.ResetButton);

            resetButton.DoClickPoint(1);
            ClickCommonDialog();
        }
 private void ProfilesImExSwitch(ATElementStruct whichProfile, AT profileTmp, AT loadingTmp, string whereToClick, bool isAimpad = false)
 {
     profileTmp = SwMainWindow.GetElement(whichProfile);
     profileTmp.DoClickPoint();
     WaitForEvent(profileTmp, loadingTmp, isAimpad);
     profileTmp = SwMainWindow.GetElement(whichProfile);
     if (whereToClick.Equals("EXPORT"))
     {
         profileTmp.GetElement(PortalObj.Profile_EXPORT).DoClickPoint();
         var dialog     = SwMainWindow.GetElement(PortalObj.Window_OpenFIle, treeScope: ATElement.TreeScope.Children, timeout: 5);
         var buttonSave = dialog.GetElement(PortalObj.Button_Save, treeScope: ATElement.TreeScope.Children, timeout: 1);
         buttonSave.DoClickPoint();
         try
         {
             dialog.GetElement(aTElementStruct: PortalObj.Button_Exist_Yes, treeScope: ATElement.TreeScope.Descendants, timeout: 1).DoClickPoint();
         }
         catch (Exception)
         {
             // ignored
         }
         WaitForEvent(profileTmp, loadingTmp, isAimpad);
     }
     else if (whereToClick.Equals("IMPORT"))
     {
         profileTmp.GetElement(PortalObj.Profile_IMPORT).DoClickPoint();
         var dialog = SwMainWindow.GetElement(PortalObj.Window_OpenFIle, treeScope: ATElement.TreeScope.Children, timeout: 5);
         dialog = dialog.GetElement(PortalObj.Button_Save, treeScope: ATElement.TreeScope.Children, timeout: 1);
         dialog.DoClickPoint();
         WaitForEvent(profileTmp, loadingTmp, isAimpad);
     }
 }
 public void Case_Reset(ATElementStruct whichResetButton)
 {
     Ireporter.Exec(() =>
     {
         MpActions.ClickResetButton(whichResetButton);
     }
                    , $"Click Reset button."
                    , $"NA."
                    , "Failed."
                    , ReportLib.Reporter.WhenCaseFailed.BlockAllLeftCases);
 }
 public void Case_SelectTab(ATElementStruct whichTab, bool reset = true)
 {
     Ireporter.Exec(() =>
     {
         MpActions.SelectTab(whichTab);
         if (reset)
         {
             MpActions.ClickResetButton();
         }
     }
                    , Ireporter.SetAsLines($"Click {whichTab.Name} tab.", reset ? "Click Reset button." : $"Go to {whichTab.Name} tab.")
                    , $"Select successfully."
                    , "Failed to select KeyMapping tab."
                    , ReportLib.Reporter.WhenCaseFailed.BlockAllLeftCases);
 }
        public void SelectTab(ATElementStruct whichTab)
        {
            var currentTabbar = GetMasterPlusMainWindow().GetElement(new ATElementStruct()
            {
                ControlType = ATElement.ControlType.Tab
            });
            //var tabs = currentTab.GetElementsAllChild();
            //tabs.GetATCollection()[GetTabIndexByTabCount(tabs.GetATCollection().Length)].DoClickPoint(1);
            var targetTab = currentTabbar.GetElementFromChild(whichTab);

            if (targetTab.GetElementInfo().ToggleState().Equals("Off"))
            {
                targetTab.DoClickPoint(1);
                UtilWait.ForTrue(() => targetTab.GetElementInfo().ToggleState().Equals("On"), 3, 1);
            }
        }
 private void ProfilesSimpleSwitch(ATElementStruct whichProfile, AT profileTmp, AT loadingTmp)
 {
     profileTmp = SwMainWindow.GetElement(whichProfile);
     profileTmp.DoClickPoint();
     WaitForLoading(loadingTmp);
 }