Esempio n. 1
0
        public void TCAdmin16_VerifyFilterByUserId()
        {
            enterUserId   = TestData.GetData("TCAdmin16_EnterUserId");
            userIdText    = TestData.GetData("TCAdmin16_UserIdTextValue");
            EmailText     = TestData.GetData("TCAdmin16_EmailTextValue");
            AccountIdText = TestData.GetData("TCAdmin16_AccountIdTextValue");

            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 userId textfield loads the values in userTable dynamically and load the page
                Assert.True(objAdminUsersPage.VerifyUserIdResultsLoad(enterUserId, userIdText));
            }

            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyFilteredByFailed, userIdText), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyFilteredByFailed, userIdText), e);
                throw e;
            }
            finally
            {
                objAdminCommonFunctions.UserMenuBtn();
                objAdminFunctions.AdminLogOut();
                TestProgressLogger.EndTest();
            }
        }
Esempio n. 2
0
        public void TCAdmin37_VerifyUserAPIKeysCreationDeletionTest()
        {
            string username;

            accountIdText   = TestData.GetData("TCAdmin19_AccountIdTextValue");
            entereAccountId = TestData.GetData("TCAdmin19_EnterAccountId");

            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();

                //Select an user from the user list and click on it
                username = objAdminCommonFunctions.getUserNameFromUserList();
                objAdminCommonFunctions.SelectUserFromUserList(driver, username);

                //Verify if entered value in accountId textfield loads the values in userTable dynamically and load the page
                Assert.True(objAdminUsersPage.VerifyAPIKeys());
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyCreationDeletionUserKeyFailed), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyCreationDeletionUserKeyFailed), e);
                throw e;
            }
            finally
            {
                objAdminCommonFunctions.UserMenuBtn();
                objAdminFunctions.AdminLogOut();
                TestProgressLogger.EndTest();
            }
        }
Esempio n. 3
0
        public void TCAdmin28_VerifyExportedByPermissionsDataTest()
        {
            selectByPermissionOption = TestData.GetData("TCAdmin28_SelectByPermissionOption");
            selectUserPermission     = TestData.GetData("TCAdmin28_SelectUserPermission");
            byPermissionUserIdValue  = TestData.GetData("TCAdmin28_UserId");

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

            try
            {
                TestProgressLogger.StartTest();

                // This method is used to Delete all files from the Folder
                genericUtils.DeleteAllFiles();
                // Login as admin -> Click on "Users" menu button -> Users Tab
                objAdminUsersPage.SelectAdminUserTab();
                // Verify the "All users" exported csv file in the Admin UI
                Assert.True(objAdminUsersPage.VerifyExportByPermission(selectByPermissionOption, byPermissionUserIdValue, selectUserPermission));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyByPermissionExportedCSVFileFailed), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyByPermissionExportedCSVFileFailed), e);
                throw e;
            }
            finally
            {
                objAdminCommonFunctions.UserMenuBtn();
                objAdminFunctions.AdminLogOut();
                TestProgressLogger.EndTest();
            }
        }
Esempio n. 4
0
        public void TCAdmin2_VerifyUsersAccountAssignedOrUnassignedTest()
        {
            userPassword        = TestData.GetData("TCAdmin2_UserPassword");
            invalidAccountID    = TestData.GetData("TCAdmin2_InvalidAccountID");
            userName            = TestData.GetData("TCAdmin1_UserName");
            newUserPassword     = TestData.GetData("TCAdmin1_UserPassword");
            userConfirmPassword = TestData.GetData("TCAdmin1_UserConfirmPassword");
            verificationLevel   = TestData.GetData("TCAdmin1_VerificationLevel");

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

            try
            {
                TestProgressLogger.StartTest();

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

                //pre-requites of creating new user to perform assign and unassign test case
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NewUserCreationInitiated));
                objAdminUsersPage.CreateNewUser(userName, newUserPassword, userConfirmPassword, verificationLevel);
                TestProgressLogger.LogCheckPoint(String.Format(LogMessage.NewUserCreationCompleted, userName));

                //Click on "Users" Tab button
                objAdminCommonFunctions.UsersTabBtn();

                //Verify the login after unassign account ID to user
                Assert.True(objAdminUsersPage.VerifyLoginUsingUnassignedAccount(userPassword));

                Thread.Sleep(2000);
                //Login as admin -> Click on "Users" menu button -> Users Tab
                objAdminUsersPage.SelectAdminUserTab();

                //Verify the login after assign account ID to user
                Assert.True(objAdminUsersPage.VerifyLoginUsingAssignedAccount(userPassword));

                Thread.Sleep(2000);
                //Login as admin -> Click on "Users" menu button -> Users Tab
                objAdminUsersPage.SelectAdminUserTab();

                //Verify the login after assign invalid account ID to user
                Assert.True(objAdminUsersPage.VerifyNonexistentAccount(invalidAccountID));
            }
            catch (NoSuchElementException ex)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(ex.Message + ex.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyAssignedOrUnassignedAccountFailed), ex);
                throw ex;
            }
            catch (Exception e)
            {
                TestProgressLogger.TakeScreenshot();
                TestProgressLogger.LogCheckPoint(e.Message + e.StackTrace);
                TestProgressLogger.LogError(String.Format(LogMessage.VerifyAssignedOrUnassignedAccountFailed), e);
                throw e;
            }
            finally
            {
                objAdminCommonFunctions.UserMenuBtn();
                objAdminFunctions.AdminLogOut();
                TestProgressLogger.EndTest();
            }
        }