Exemple #1
0
        public static void SelectValueInPlansBy(string plansBy)
        {
            try
            {
                repo.MonitoredSQLServerProperties.pnlPoorlyPerforming.ddlPPPlansByInfo.WaitForItemExists(1000000);
                Common.WaitForSync(5000);
                repo.MonitoredSQLServerProperties.pnlPoorlyPerforming.btnPPPlandByOpen.ClickThis();
                Common.WaitForSync(5000);

                string   defaultSelectedItem = repo.MonitoredSQLServerProperties.pnlPoorlyPerforming.ddlPPPlansBy.SelectedItem.Text;
                ListItem itemToSelect        = @"/form/?/?/list[@accessiblename='" + defaultSelectedItem + "']/listitem[@accessiblename='" + plansBy + "']";

                if (itemToSelect != null)
                {
                    itemToSelect.ClickThis();
                    Common.WaitForSync(5000);
                    Reports.ReportLog("Successfully Selected Plans By As: " + plansBy, Reports.SQLdmReportLevel.Success, null, Config.TestCaseName);
                }
                else
                {
                    Reports.ReportLog("Failed to Select Plans By As: " + plansBy, Reports.SQLdmReportLevel.Info, null, Config.TestCaseName);
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Failed : SelectValueInPlansBy :" + ex.Message);
            }
        }