Esempio n. 1
0
 public static void SelectServer()
 {
     try
     {
         string   servername = Preconditions.Steps.GetServerFromTCName(Config.TestCaseName);
         TreeItem item       = repo.ChooseServer.SelectServer.GetItem(servername);
         item.ClickThis();
         Reports.ReportLog("SelectServer", Reports.ADSReportLevel.Success, null, Config.TestCaseName);
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : SelectServer : " + ex.Message);
     }
 }
Esempio n. 2
0
 public static void ClickOnServer(string serverName)
 {
     try
     {
         repo.Application.AllServersInfo.WaitForItemExists(120000);
         TreeItem serveritem = repo.Application.AllServers.GetChildItem(serverName);
         if (serveritem != null)
         {
             serveritem.ClickThis();
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : ClickOnAllServers : " + ex.Message);
     }
 }
Esempio n. 3
0
 public static void SelectServer()
 {
     try
     {
         repo.ChooseFromServers.SelfInfo.WaitForItemExists(10000);
         string   serverName = Preconditions.Steps.GetServerFromTCName(Config.TestCaseName);
         TreeItem ServerItem = repo.ChooseFromServers.LocalServers.GetItem(serverName);
         if (ServerItem != null)
         {
             TreeItem adsdbItem = ServerItem.GetItem(Config.ADSDB, false);
             adsdbItem.ClickThis();
             repo.ChooseFromServers.OkButton.ClickThis();
             Reports.ReportLog("SelectServer", Reports.ADSReportLevel.Success, null, Config.TestCaseName);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Failed : SelectServer : " + ex.Message);
     }
 }
Esempio n. 4
0
        public static void SelectServer(string serverName)
        {
            try
            {
                repo.SQLdmDesktop.AllServersInfo.WaitForItemExists(120000);
                TreeItem serveritem = repo.SQLdmDesktop.AllServers.GetChildItem(serverName);

                if (serveritem != null)
                {
                    serveritem.ClickThis();
                    Reports.ReportLog("Successfully Selected Required Server : " + serverName, Reports.SQLdmReportLevel.Success, null, Config.TestCaseName);
                }
                else
                {
                    Reports.ReportLog("Required Server is Not Available to Select", Reports.SQLdmReportLevel.Fail, null, Config.TestCaseName);
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Failed : SelectServer :" + ex.Message);
            }
        }
Esempio n. 5
0
        public static TreeItem GetServerTreeFromTCName(string TCName)
        {
            TreeItem item = null;

            try
            {
                if (TCName.Contains(ServerListConstants.Amazon_Redshift))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Amazon_Redshift.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Cassandra_37))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Cassandra_37.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Cassandra_22))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Cassandra_22.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Apache_Derby_1014))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Apache_Derby_1014.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Derby_1013))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Derby_1013.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.DB2_LUW_111))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.DB2_LUW_111.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.DB2_LUW_105))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.DB2_LUW_105.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Greenplum_50))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Greenplum_50.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Greenplum_4312))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Greenplum_4312.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Informix_1170))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Informix_1170.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Informix_1210))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Informix_1210.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.MariaDB_102))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.MariaDB_102.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.MongoDB_321))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.MongoDB_321.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.MongoDB_341))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.MongoDB_341.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.MySQL_80))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.MySQL_80.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.MySQL_57))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.MySQL_57.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Netezza_72))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Netezza_72.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Oracle_121020))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Oracle_121020.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Oracle_11gR2))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Oracle_11gR2.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.PostgreSQL_100))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.PostgreSQL_100.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.PostgreSQL_96))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.PostgreSQL_96.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.SAP_Hana_20))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.SAP_Hana_20.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Microsoft_SQL_Azure_RTM_12020008))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Microsoft_SQL_Azure_RTM_12020008.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.SQL_Server_2017))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.SQL_Server_2017.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.SQL_Server_2016))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.SQL_Server_2016.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Sybase_Any_16))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Sybase_Any_16.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Sybase_Any_17))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Sybase_Any_17.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Sybase_ASE_16))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Sybase_ASE_16.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Sybase_ASE_157))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Sybase_ASE_157.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Sybase_IQ_154))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Sybase_IQ_154.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Sybase_IQ_160))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Sybase_IQ_160.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Teradata_150))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Teradata_150.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Teradata_151))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Teradata_151.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Teradata_1620))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Teradata_1620.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Vertica_80))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Vertica_80.Replace('_', ' '));
                }
                if (TCName.Contains(ServerListConstants.Vertica_91))
                {
                    item = repo.ServersList.LocalDBServersTreeItem.GetItem(ServerListConstants.Vertica_91.Replace('_', ' '));
                }

                item.EnsureVisible();
                item.ClickThis();
            }
            catch (Exception ex)
            {
                throw new Exception("Get ServerTree From TCName failed : " + ex.Message);
            }
            return(item);
        }
Esempio n. 6
0
        public static TreeItem GetServerTreeFromTCName_old(string TCName)
        {
            TreeItem item = null;

            try
            {
                if (TCName.Contains(ServerListConstants.Amazon_Redshift))
                {
                    item = repo.ServersList.AmazonRedshift;
                }
                if (TCName.Contains(ServerListConstants.Cassandra_37))
                {
                    item = repo.ServersList.Cassandra37;
                }
                if (TCName.Contains(ServerListConstants.Cassandra_22))
                {
                    item = repo.ServersList.Cassandra22;
                }
                if (TCName.Contains(ServerListConstants.Apache_Derby_1014))
                {
                    item = repo.ServersList.Derby1014;
                }
                if (TCName.Contains(ServerListConstants.Derby_1013))
                {
                    item = repo.ServersList.Derby1013;
                }
                if (TCName.Contains(ServerListConstants.DB2_LUW_111))
                {
                    item = repo.ServersList.DB2111;
                }
                if (TCName.Contains(ServerListConstants.DB2_LUW_105))
                {
                    item = repo.ServersList.DB2105;
                }
                if (TCName.Contains(ServerListConstants.Greenplum_50))
                {
                    item = repo.ServersList.Greenplum50;
                }
                if (TCName.Contains(ServerListConstants.Greenplum_4312))
                {
                    return(repo.ServersList.Greenplum50);
                }
                if (TCName.Contains(ServerListConstants.Informix_1170))
                {
                    item = repo.ServersList.Informix1170;
                }
                if (TCName.Contains(ServerListConstants.Informix_1210))
                {
                    item = repo.ServersList.Informix1210;
                }
                if (TCName.Contains(ServerListConstants.MariaDB_102))
                {
                    item = repo.ServersList.MariaDB;
                }
                if (TCName.Contains(ServerListConstants.MongoDB_321))
                {
                    item = repo.ServersList.MongoDB321;
                }
                if (TCName.Contains(ServerListConstants.MongoDB_341))
                {
                    item = repo.ServersList.MongoDB341;
                }
                if (TCName.Contains(ServerListConstants.MySQL_80))
                {
                    item = repo.ServersList.MySQL80;
                }
                if (TCName.Contains(ServerListConstants.MySQL_57))
                {
                    item = repo.ServersList.MySQL57;
                }
                if (TCName.Contains(ServerListConstants.Netezza_72))
                {
                    item = repo.ServersList.Netezza72;
                }
                if (TCName.Contains(ServerListConstants.Oracle_121020))
                {
                    item = repo.ServersList.Oracle20;
                }
                if (TCName.Contains(ServerListConstants.Oracle_11gR2))
                {
                    item = repo.ServersList.OracleR2;
                }
                if (TCName.Contains(ServerListConstants.PostgreSQL_100))
                {
                    item = repo.ServersList.PostgreSQL100;
                }
                if (TCName.Contains(ServerListConstants.PostgreSQL_96))
                {
                    item = repo.ServersList.PostgreSQL96;
                }
                if (TCName.Contains(ServerListConstants.SAP_Hana_20))
                {
                    item = repo.ServersList.SAPHana20;
                }
                if (TCName.Contains(ServerListConstants.Microsoft_SQL_Azure_RTM_12020008))
                {
                    item = repo.ServersList.MicrosoftSQLAzure08;
                }
                if (TCName.Contains(ServerListConstants.SQL_Server_2017))
                {
                    item = repo.ServersList.SQLServer2017;
                }
                if (TCName.Contains(ServerListConstants.SQL_Server_2016))
                {
                    item = repo.ServersList.SQLServer2016;
                }
                if (TCName.Contains(ServerListConstants.Sybase_Any_16))
                {
                    item = repo.ServersList.SybaseAny16;
                }
                if (TCName.Contains(ServerListConstants.Sybase_Any_17))
                {
                    item = repo.ServersList.SybaseAny17;
                }
                if (TCName.Contains(ServerListConstants.Sybase_ASE_16))
                {
                    item = repo.ServersList.SybaseASE16;
                }
                if (TCName.Contains(ServerListConstants.Sybase_ASE_157))
                {
                    item = repo.ServersList.SybaseASE157;
                }
                if (TCName.Contains(ServerListConstants.Sybase_IQ_154))
                {
                    item = repo.ServersList.SybaseIQ154;
                }
                if (TCName.Contains(ServerListConstants.Sybase_IQ_160))
                {
                    item = repo.ServersList.SybaseIQ160;
                }
                if (TCName.Contains(ServerListConstants.Teradata_150))
                {
                    item = repo.ServersList.Teradata150;
                }
                if (TCName.Contains(ServerListConstants.Teradata_151))
                {
                    item = repo.ServersList.Teradata150;
                }
                if (TCName.Contains(ServerListConstants.Teradata_1620))
                {
                    item = repo.ServersList.Teradata1620;
                }
                if (TCName.Contains(ServerListConstants.Vertica_80))
                {
                    item = repo.ServersList.Vertica80;
                }
                if (TCName.Contains(ServerListConstants.Vertica_91))
                {
                    item = repo.ServersList.Vertica91;
                }

                item.EnsureVisible();
                item.ClickThis();
            }
            catch (Exception ex)
            {
                throw new Exception("Get ServerTree From TCName failed : " + ex.Message);
            }
            return(item);
        }