Exemplo n.º 1
0
        public static string GetUFTInstallationInfo()
        {
            try
            {
                var    qtpi   = new QuickTestProInfo();
                string output = "No";

                if (qtpi.IsInstalled)
                {
                    if (qtpi.ProductName.Contains("QC Integration"))
                    {
                        var qtp = InstalledProgramsHelper.GetInstalledProgramByName(new Regex("HP Unified Functional Testing"));
                        if (qtp != null)
                        {
                            output = "Yes, " + qtp.DisplayName + " " + qtp.DisplayVersion;
                        }
                    }
                    else
                    {
                        output = Html.BoolToYesNo(qtpi.IsInstalled) + " " + qtpi.ProductName + " " + qtpi.ProductVersion + Helper.ConvertInstallDate(qtpi.InstallDate);
                    }
                }
                return(output);
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                return(Html.ErrorMsg());
            }
        }
Exemplo n.º 2
0
        public static string GetUFTInstallationInfo()
        {
            try
            {
              var qtpi = new QuickTestProInfo();
              string output = "No";

              if (qtpi.IsInstalled)
              {
            if (qtpi.ProductName.Contains("QC Integration"))
            {
              var qtp = InstalledProgramsHelper.GetInstalledProgramByName(new Regex("HP Unified Functional Testing"));
              if (qtp != null)
                output = "Yes, " + qtp.DisplayName + " " + qtp.DisplayVersion;
            }
            else
              output = Html.BoolToYesNo(qtpi.IsInstalled) + " " + qtpi.ProductName + " " + qtpi.ProductVersion + Helper.ConvertInstallDate(qtpi.InstallDate);
              }
              return output;
            }
            catch (Exception ex)
            {
              Logger.Error(ex.ToString());
              return Html.ErrorMsg();
            }
        }