Beispiel #1
0
        public void TCAdmin18_VerifyFilterByEmail()
        {
            EmailText   = TestData.GetData("TCAdmin18_EmailTextValue");
            entereEmail = TestData.GetData("TCAdmin18_EnterEmail");

            AdminFunctions       objAdminFunctions       = new AdminFunctions(TestProgressLogger);
            AdminCommonFunctions objAdminCommonFunctions = new AdminCommonFunctions(TestProgressLogger);
            AdminUsersPage       objAdminUsersPage       = new AdminUsersPage(TestProgressLogger);

            try
            {
                TestProgressLogger.StartTest();
                //Login as admin -> Click on "Users" menu button -> Users Tab
                objAdminUsersPage.SelectAdminUserTab();

                //Click on "ViewAll" button
                objAdminUsersPage.ClickOnViewAllButton();

                //Verify if entered value in email textfield loads the values in userTable dynamically and load the page
                Assert.True(objAdminUsersPage.VerifyEmailResultsLoad(entereEmail, EmailText));
            }

            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyFilteredByFailed, EmailText), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyFilteredByFailed, EmailText), e);
                throw e;
            }
            finally
            {
                objAdminCommonFunctions.UserMenuBtn();
                objAdminFunctions.AdminLogOut();
                TestProgressLogger.EndTest();
            }
        }