private void WaitForLoadingOrReconnecting(AT profileTmp, AT loadingTmp)
 {
     if (UtilOs.GetOsVersion().Contains(UtilOs.Name.Win10))
     {
         UtilTime.WaitTime(3);
     }
     else
     {
         UtilTime.WaitTime(3);
     }
     try
     {
         profileTmp = SwMainWindow.GetElement(aTElementStruct: PortalObj.Profile_1, treeScope: ATElement.TreeScope.Descendants, returnNullWhenException: true);
         if (profileTmp == null)
         {
             SwMainWindow.GetElement(aTElementStruct: PortalObj.TabItem_PROFILES, treeScope: ATElement.TreeScope.Descendants).DoClickPoint();
             return;
         }
         do
         {
             loadingTmp = SwMainWindow.GetElement(aTElementStruct: PortalObj.Lable_LOADING, treeScope: ATElement.TreeScope.Descendants, returnNullWhenException: true);
         } while (loadingTmp != null);
     }
     catch (Exception)
     {
         // ignored
     }
 }
 public MasterPlusTestCases()
 {
     MpActions = new MasterPlusTestActions();
     MpActions.Initialize();
     Ireporter = new ReporterXsl(Path.Combine(MpActions.GetResultTimePath(), new StackTrace().GetFrame(0).GetMethod().ReflectedType?.Name + ".xml"),
                                 ProjectPath.GetProjectFullPath(), MpActions.GetScreenshotsRelativePath(),
                                 new Reporter.ResultTestInfo
     {
         AttrProject     = "Cooler Master",
         AttrOs          = UtilOs.GetOsVersion(),
         AttrLanguage    = System.Globalization.CultureInfo.InstalledUICulture.Name.Replace("-", "_"),
         AttrRegion      = System.Globalization.CultureInfo.InstalledUICulture.Name.Split('-')[1],
         AttrDeviceModel = ReportLib.Reporter.DefaultContent,
         AttrDeviceName  = ReportLib.Reporter.DefaultContent,
         AttrVersion     = UtilOs.GetOsProperty(),
         AttrTotalCases  = 0,
         AttrPasses      = 0,
         AttrFailures    = 0,
         AttrTbds        = 0,
         AttrBlocks      = 0
     });
     MpActions.SetIReport(Ireporter);
 }
        public TestStepHandler(string pathReportXml = "")
        {
            _iReporter      = ReporterManager.GeReporter(pathReportXml);
            _resultTestInfo = new ResultTestInfo
            {
                AttrProject     = "CM",
                AttrOs          = UtilOs.GetOsVersion(),
                AttrLanguage    = System.Globalization.CultureInfo.InstalledUICulture.Name.Replace("-", "_"),
                AttrRegion      = System.Globalization.CultureInfo.InstalledUICulture.Name.Split('-')[1],
                AttrDeviceModel = DefaultContent,
                AttrDeviceName  = DefaultContent,
                AttrVersion     = DefaultContent,
                AttrTotalCases  = 0,
                AttrPasses      = 0,
                AttrFailures    = 0,
                AttrTbds        = 0,
                AttrBlocks      = 0
            };

            //(string project, string os, string language, string region, string time, string deviceModel, string deviceName, string testTotalNumber, string version, string name, string testName
            //, string testName, string testName, string testName, string testName, string testName)
            // _pathReportFile = pathReportXml;
        }