示例#1
0
        public void DeleteGQ_NotInUse()
        {
            HomePage homePage = new HomePage(_driver);
            SelectQuestionTypePage selectQuestionTypePage = new SelectQuestionTypePage(_driver);

            ExtentReport.test = ExtentReport.extent.StartTest("To Delete Global Question that are not in use");
            ArrayList list = ExcelData.GetData("ER_TESTDATA", "HomePagesVerify", "KeyName", "HomeSystemConfigurationPage");

            homePage.EperformSystemConfigurationArrowIcon.Click();
            homePage.EperformGlobalQuestionsOption.Click();
            Assert.IsTrue(selectQuestionTypePage.BtnAddGlobalQuestion.Displayed, "Add Global Questions Button is not displayed in the Global Question List Page");
            ExtentReport.test.Log(LogStatus.Pass, "Add Global Questions Button is displayed in the Global Question List Page");

            DataTable dt        = ExcelData.GetData_DataTable("ER_TESTDATA", "GQSingleLineTextBox", "KeyName", "Default");
            string    reference = selectQuestionTypePage.CreateGQ_SingleLineTextBox(dt.Rows[0]);

            GlobalQuestionsListPage gqListPage = new GlobalQuestionsListPage(_driver);

            gqListPage.SearchGQ(reference);
            Thread.Sleep(2000);
            gqListPage.SearchedDeleteButton.Click();
            Thread.Sleep(2000);
            gqListPage.DeletePopupConfirmButton.Click();
            Thread.Sleep(1000);
            Assert.IsTrue(gqListPage.SuccessMessage.Displayed, reference + " - Single Line Text Box Global Question is not deleted successfully");
            ExtentReport.test.Log(LogStatus.Pass, "Success Message is displayed, " + reference + " - Single Line Text Box Global Question has been deleted successfully");
        }
示例#2
0
        public void Sorting()
        {
            HomePage homePage = new HomePage(_driver);
            GlobalQuestionsListPage globalQuestionsListPage = new GlobalQuestionsListPage(_driver);

            ExtentReport.test = ExtentReport.extent.StartTest("To Sort All Columns in Global Questions List");
            homePage.EperformSystemConfigurationArrowIcon.Click();
            homePage.EperformGlobalQuestionsOption.Click();

            Assert.IsTrue(globalQuestionsListPage.KeywordText.Displayed, "Keyword Text is not displayed in the Global Question List Page");
            ExtentReport.test.Log(LogStatus.Pass, "Keyword Text is displayed in the Global Question List Page");

            globalQuestionsListPage.Sorting();
        }
示例#3
0
        public void CustomiseGlobalQuestionsList()
        {
            HomePage homePage = new HomePage(_driver);
            GlobalQuestionsListPage globalQuestionsListPage = new GlobalQuestionsListPage(_driver);

            ExtentReport.test = ExtentReport.extent.StartTest("To Customise Global Questions List");
            homePage.EperformSystemConfigurationArrowIcon.Click();
            homePage.EperformGlobalQuestionsOption.Click();

            Assert.IsTrue(globalQuestionsListPage.KeywordText.Displayed, "Keyword Text is not displayed in the Global Question List Page");
            ExtentReport.test.Log(LogStatus.Pass, "Keyword Text is displayed in the Global Question List Page");

            DataTable dt = ExcelData.GetData_DataTable("ER_TESTDATA", "GlobalQuestionListCustomise", "KeyName", "Default");

            globalQuestionsListPage.CustomiseGlobalQuestionsList(dt.Rows[0]);
        }
示例#4
0
        public void SearchGlobalQuestions_Normal()
        {
            HomePage homePage = new HomePage(_driver);
            GlobalQuestionsListPage globalQuestionsListPage = new GlobalQuestionsListPage(_driver);

            ExtentReport.test = ExtentReport.extent.StartTest("To Search Global Questions normally");
            homePage.EperformSystemConfigurationArrowIcon.Click();
            homePage.EperformGlobalQuestionsOption.Click();

            Assert.IsTrue(globalQuestionsListPage.KeywordText.Displayed, "Keyword Text is not displayed in the Global Question List Page");
            ExtentReport.test.Log(LogStatus.Info, "Keyword Text is displayed in the Global Question List Page");

            DataTable dt = ExcelData.GetData_DataTable("ER_TESTDATA", "GlobalQuestionListSearch", "KeyName", "GlobalQuestionSearch_01");

            globalQuestionsListPage.SearchGlobalQuestions(dt.Rows[0]);
        }
        public void EditGQ_FileUpload(DataRow drAdd, DataRow drEdit)
        {
            CreateGQ_FileUpload(drAdd);
            GlobalQuestionsListPage gqListPage = new GlobalQuestionsListPage(driver);

            gqListPage.SearchGQ(reference);
            formSubmitType = "edited";
            Thread.Sleep(2000);
            gqListPage.SearchedEditButton.Click();
            CreateGQ_FileUpload(drEdit);
            gqListPage.SearchGQ(reference);
            Thread.Sleep(2000);
            IList <IWebElement> searchedItem = gqListPage.ReferenceList.ToList();

            Assert.AreEqual(reference, searchedItem[0].Text, "File Upload Global Question was not created and edited successfully");
            ExtentReport.test.Log(LogStatus.Pass, "File Upload Global Question was created and edited successfully");
        }