/// <summary>
 /// Logs the test ending.
 /// </summary>
 /// <param name="driverContext">The driver context.</param>
 public void LogTestEnding(DriverContext driverContext)
 {
     var endTestTime = DateTime.Now;
     var timeInSec = (endTestTime - this.startTestTime).TotalMilliseconds / 1000d;
     this.Info("END: {0} ends at {1} after {2} sec.", driverContext.TestTitle, endTestTime, timeInSec.ToString("##,###", CultureInfo.CurrentCulture));
     this.Info("*************************************************************************************");
 }
 public ForgotPasswordPage(DriverContext driverContext)
     : base(driverContext)
 {
     Logger.Info("Waiting for page to open");
     this.Driver.IsElementPresent(this.pageHeader, BaseConfiguration.ShortTimeout);
 }
        public void BTA347_MP_VerifyLoyaltyIDCardsAndViewOptions()
        {
            ProjectBasePage basePages = new ProjectBasePage(driverContext);

            testCase        = new TestCase(TestContext.TestName);
            listOfTestSteps = new List <TestStep>();
            testStep        = new TestStep();
            string stepName = "";

            try
            {
                #region  Object Initialization
                var MP_LoginPage = new MemberPortal_LoginPage(driverContext);
                MemberPortal_LoginPage     loginPage     = new MemberPortal_LoginPage(driverContext);
                MemberPortal_MyAccountPage myAccountPage = new MemberPortal_MyAccountPage(driverContext);
                MemberPortal_MyWalletPage  myWalletPage  = new MemberPortal_MyWalletPage(driverContext);
                #endregion

                #region Precondition:Create Member with Loyalty ID
                testStep = TestStepHelper.StartTestStep(testStep);
                stepName = "Adding member with Loyalty ID from CDIS service";
                Member output = basePages.CreateMemberThroughCDIS();
                Login  login  = new Login
                {
                    UserName = output.Username,
                    Password = MemberPortalData.MP_password
                };
                testStep.SetOutput("Loyalty ID:" + basePages.GetLoyaltyNumber(output) + ", Name:" + output.FirstName + " Created Successfully");
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step1:Launch Member Service Portal URL
                stepName = "Launch Member Service Portal URL";
                testStep = TestStepHelper.StartTestStep(testStep);
                MP_LoginPage.LaunchMemberPortal(login.MemberPortal_url, out string Step_Output); testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step2:Login to Member Portal
                stepName = "Login to Member Portal";
                testStep = TestStepHelper.StartTestStep(testStep);
                loginPage.LoginMemberPortal(login.UserName, login.Password, out Step_Output); testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step3:Navigate to My Wallet page
                stepName = "Verify successful navigation to My Wallet page";
                testStep = TestStepHelper.StartTestStep(testStep);
                myAccountPage.NavigateToMPDashBoardMenu(MemberPortal_MyAccountPage.MPDashboard.MyWallet, out Step_Output);
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step4:Verify My Loyalty Cards Loyalty ID
                stepName = "Verify My Loyalty Cards > Loyalty ID Number";
                testStep = TestStepHelper.StartTestStep(testStep);
                myWalletPage.VerifyMyLoyaltyCardsLoyaltyID(basePages.GetLoyaltyNumber(output), out Step_Output);
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step5:Verify My Loyalty Cards sections
                stepName = "Verify My Loyalty Cards sections";
                testStep = TestStepHelper.StartTestStep(testStep);
                myWalletPage.VerifyLoyaltyCardsSection(out Step_Output);
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step6:Verify My Loyalty Cards buttons
                stepName = "Verify My Loyalty Cards buttons";
                testStep = TestStepHelper.StartTestStep(testStep);
                myWalletPage.VerifyLoyaltyCardsButtonOptions(out Step_Output);
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step7:Logout from member portal
                stepName = "Logout from Member Portal";
                testStep = TestStepHelper.StartTestStep(testStep);
                loginPage.LogoutMPPortal(); testStep.SetOutput("Logout from Member Portal is Successful");
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion
                testCase.SetStatus(true);
            }
            catch (Exception e)
            {
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName + e, false, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                testCase.SetStatus(false);
                testCase.SetErrorMessage(e.Message);
                testCase.SetImageContent(DriverContext.TakeScreenshot().ToString());
                Assert.Fail();
            }
            finally
            {
                testCase.SetTestCaseSteps(listOfTestSteps);
                testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow());
                listOfTestCases.Add(testCase);
            }
        }
Example #4
0
        public void BTA138_CSP_CreateMemberWithLoyaltyID()
        {
            ProjectBasePage basePages = new ProjectBasePage(driverContext);

            testCase        = new TestCase(TestContext.TestName);
            listOfTestSteps = new List <TestStep>();
            testStep        = new TestStep();
            string stepName = "";
            bool   stepstatus;
            string stepOutput = "";

            try
            {
                Common common = new Common(DriverContext);
                #region Generating Test Data to Create new user with loyalty card
                MemberProfile MP_Model = new MemberProfile(DriverContext);
                Member        member   = MP_Model.GenerateMemberBasicInfo();
                MemberDetails details  = MP_Model.GenerateMemberDetails();
                VirtualCard   vc       = MP_Model.GenerateVirtualCard();
                #endregion

                #region Step1:Launch CSPortal Portal
                stepName = "Launch Customer Service Portal URL";
                testStep = TestStepHelper.StartTestStep(testStep);
                var CSP_LoginPage = new CSPortal_LoginPage(DriverContext);
                CSP_LoginPage.LaunchCSPortal(login.Csp_url, out string Step_Output); testStep.SetOutput(Step_Output);
                testStep.SetOutput("Launch Customer Service Portal URL is Successful");
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step2:Login As csadmin
                stepName       = "Login As csadmin User";
                testStep       = TestStepHelper.StartTestStep(testStep);
                login.UserName = CsPortalData.csadmin;
                login.Password = CsPortalData.csadmin_password;
                CSP_LoginPage.LoginCSPortal(login.UserName, login.Password, out Step_Output); testStep.SetOutput(Step_Output);
                testStep.SetOutput("Login As csadmin User is Successful");
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step3:Navigate to Member Registration
                stepName = "Navigate to Member Registration";
                var CSP_HomePage = new CSPortal_HomePage(DriverContext);
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_HomePage.NavigateToDashBoardMenu(CSPortal_HomePage.DashBoard.MemberRegistration, out stepOutput);
                testStep.SetOutput(stepOutput);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step4:Enter Basic Info
                stepName = "Enter Basic Info Details on Member Registration page";
                var CSP_RegistrationPage = new CSPortal_MemberRegistrationPage(DriverContext);
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_RegistrationPage.EnterBasicInfo_Details(member.FirstName, member.LastName, member.MiddleName, details.Gender, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step5:Enter Loyalty Card Info
                stepName   = "Enter  Loyalty Card Info Details on Member Registration page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_RegistrationPage.EnterDefaultLoyaltyCard_Details(vc.LoyaltyIdNumber, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step6:Enter Address
                stepName   = "Enter  Address Info Details on Member Registration page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_RegistrationPage.EnterAddress_Details(details.AddressLineOne, details.AddressLineTwo, details.Country, details.StateOrProvince, details.City, details.ZipOrPostalCode, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step7:Enter ContactInfo
                stepName   = "Enter  Contact Info Details on Member Registration page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_RegistrationPage.EnterContactInfo_Details(member.PrimaryEmailAddress, member.PrimaryPhoneNumber, member.PrimaryPhoneNumber, member.PrimaryPhoneNumber, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step8:Enter login Credentials
                stepName   = "Enter  login Credentials Details on Member Registration page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_RegistrationPage.EnterLoginCredentials_Details(member.Username, member.Password, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step9:Select All Opt In/Out Check boxes
                stepName   = "Select All Opt In/Out Check boxes";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_RegistrationPage.EnterOptIn_Out_Details("DirectMailOptIn", "EmailOptIn", "SmsOptIn", out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step10:Save Registration and Verify Loyalty ID
                stepName = "Save Registration and Verify Loyalty ID ";
                testStep = TestStepHelper.StartTestStep(testStep);
                CSP_RegistrationPage.SaveRegistration();
                var CSPAccountSummaryPage = new CSPortal_MemberAccountSummaryPage(DriverContext);
                stepstatus = CSPAccountSummaryPage.VerifyLoyaltyId(vc.LoyaltyIdNumber, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step11:Navigate to Member Search
                stepName   = "Navigate to Member Search ";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_HomePage.NavigateToDashBoardMenu(CSPortal_HomePage.DashBoard.MemberSearch, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step12:Search Based on Loyalty ID
                stepName = "Search Based on Loyalty ID";
                testStep = TestStepHelper.StartTestStep(testStep);
                var CSPSearchPage = new CSPortal_SearchPage(DriverContext);
                stepstatus = CSPSearchPage.Search_BasedOnLoyaltyID(vc.LoyaltyIdNumber, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step13:Select and Verify Loyalty ID
                stepName = "Select and Verify Loyalty ID";
                testStep = TestStepHelper.StartTestStep(testStep);
                CSPSearchPage.Select(member.FirstName);
                stepstatus = CSPAccountSummaryPage.VerifyLoyaltyId(vc.LoyaltyIdNumber, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step14:Logout As csadmin
                stepName = "Logout As csadmin";
                testStep = TestStepHelper.StartTestStep(testStep);
                CSP_HomePage.LogoutCSPortal();
                testStep.SetOutput("Logout is Successful");
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion
                testCase.SetStatus(true);
            }

            catch (Exception e)
            {
                stepstatus = false;
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName + e, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                testCase.SetStatus(false);
                testCase.SetErrorMessage(e.Message);
                testCase.SetImageContent(DriverContext.TakeScreenshot().ToString());
                Assert.Fail();
            }
            finally
            {
                testCase.SetTestCaseSteps(listOfTestSteps);
                testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow());
                listOfTestCases.Add(testCase);
            }
        }
Example #5
0
        public TestStep ChangePasswordWithValidValues(string _OldPassword_Message1, string _NewPassword_Message1, string _ConfirmNewPassword_Message1, List <TestStep> listOfTestSteps)
        {
            string stepName = "Change Password with Valid Values";

            testStep = TestStepHelper.StartTestStep(testStep);
            try
            {
                ChangePasswordOnLoginPrompt(_OldPassword_Message1, _NewPassword_Message1, _ConfirmNewPassword_Message1, out string Message);
                testStep.SetOutput(Message);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                return(testStep);
            }
            catch (Exception e)
            {
                testStep.SetOutput(e.Message);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, false, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                throw new Exception(e.Message);
            }
        }
Example #6
0
 /// <summary>
 /// Initializes the driverContext
 /// </summary>
 /// <param name="driverContext"></param>
 public CSPortal_ChangePassword(DriverContext driverContext)
     : base(driverContext)
 {
 }
Example #7
0
 public BasePage(DriverContext driverContext)
 {
     this.DriverContext = driverContext;
     this.Driver = driverContext.Driver;
 }
Example #8
0
 public CandidateResultsPage(DriverContext driverContext) : base(driverContext, "Candidate")
 {
 }
 public JavaScriptAlertsPage(DriverContext driverContext)
     : base(driverContext)
 {
 }
Example #10
0
 public Index(DriverContext driverContext)
     : base(driverContext)
 {
     PageFactory.InitElements(this.DriverContext.Driver, this);
 }
 public NestedFramesPage(DriverContext driverContext)
     : base(driverContext)
 {
 }
 public MultipleWindowsPage(DriverContext driverContext)
     : base(driverContext)
 {
 }
 /// <summary>
 /// Logs the test starting.
 /// </summary>
 /// <param name="driverContext">The driver context.</param>
 public void LogTestStarting(DriverContext driverContext)
 {
     this.startTestTime = DateTime.Now;
     this.Info("*************************************************************************************");
     this.Info("START: {0} starts at {1}.", driverContext.TestTitle, this.startTestTime);
 }
        public void BTA_511_MP_Member_Update()
        {
            ProjectBasePage basePages = new ProjectBasePage(driverContext);

            testCase        = new TestCase(TestContext.TestName);
            listOfTestSteps = new List <TestStep>();
            testStep        = new TestStep();
            string stepName = "";

            try
            {
                #region Object initialization
                MemberProfile MP_Model      = new MemberProfile(DriverContext);
                var           loginPage     = new MemberPortal_LoginPage(DriverContext);
                var           myAccountPage = new MemberPortal_MyAccountPage(driverContext);
                var           myProfilePage = new MemberPortal_MyProfilePage(driverContext);
                #endregion

                #region Step1: Adding member with CDIS service
                testStep = TestStepHelper.StartTestStep(testStep);
                stepName = "Adding member with CDIS service";
                Member output = basePages.CreateMemberThroughCDIS();
                testStep.SetOutput("Member UserName:"******"; First Name: " + output.FirstName + "; Last Name:" + output.LastName + "; Birth Date: " + output.BirthDate + "; Email Address:" + output.PrimaryEmailAddress + ": end");
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Generating Test Data to Create new user with loyalty card
                Member        member  = MP_Model.GenerateMemberBasicInfo();
                MemberDetails details = MP_Model.GenerateMemberDetails();
                #endregion

                #region Step2:Launch Member Portal
                stepName = "Launch Member Portal URL";
                testStep = TestStepHelper.StartTestStep(testStep);
                loginPage.LaunchMemberPortal(login.MemberPortal_url, out string Output);
                testStep.SetOutput(Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step3: Login As Member
                stepName       = "Login As Member User";
                testStep       = TestStepHelper.StartTestStep(testStep);
                login.UserName = output.Username;
                login.Password = "******";
                string MemberLoyaltyNumber = DatabaseUtility.GetLoyaltyID(output.IpCode.ToString());
                loginPage.LoginMemberPortal(login.UserName, login.Password, out string Message);
                testStep.SetOutput(Message);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step4:Navigate to My Profile page
                stepName = "Navigate to My Profile page";
                testStep = TestStepHelper.StartTestStep(testStep);
                myAccountPage.NavigateToMPDashBoardMenu(MemberPortal_MyAccountPage.MPDashboard.MyProfile, out var Step_Output); var strStatus = Step_Output;
                testStep.SetStatus(myProfilePage.VerifyMyProfilePage(MemberPortal_MyProfilePage.Sections.MyProfile.ToString(), out Step_Output)); strStatus = strStatus + ". " + Step_Output;
                testStep.SetOutput(strStatus);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step5:Update Basic Info
                stepName = "Update Basic Info Details on Member Update Profile page";
                testStep = TestStepHelper.StartTestStep(testStep);
                var stepstatus = myProfilePage.UpdateBasicInfo_Details(member.FirstName, member.LastName, details.Gender, out var stepOutput); testStep.SetOutput(stepOutput);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step6:Update Address
                stepName   = "Update  Address Info Details on Member Update Profile page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = myProfilePage.UpdateAddress_Details(details.AddressLineOne, details.AddressLineTwo, details.Country, details.StateOrProvince, details.City, details.ZipOrPostalCode, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step7:Update ContactInfo
                stepName   = "Update  Contact Info Details on Member Update Profile page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = myProfilePage.UpdateContactInfo_Details(member.PrimaryEmailAddress, member.PrimaryPhoneNumber, member.PrimaryPhoneNumber, member.PrimaryPhoneNumber, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step8:Select All Opt In/Out Check boxes to Update
                stepName   = "Select All Opt In/Out Check boxes to Update";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = myProfilePage.CommunicationPreferences("DirectMailOptIn", "EmailOptIn", "SmsOptIn", out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step10:Save Update profile and Verify update success
                stepName = "Save Update profile and Verify update success";
                testStep = TestStepHelper.StartTestStep(testStep);
                myProfilePage.SaveRegistrationAndUpdateSuccess(out stepOutput); testStep.SetOutput(stepOutput);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step11: Verify updated First Name and Last Name
                stepName = "Verify updated First Name and Last Name";
                testStep = TestStepHelper.StartTestStep(testStep);
                loginPage.VerifyMemberPortalLoginSuccessfulForUser(member.FirstName, member.LastName); testStep.SetOutput("Member update successful for First Name: " + member.FirstName + "; and Last Name: " + member.LastName);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step12: Logout from member portal
                stepName = "Logout from Member Portal";
                testStep = TestStepHelper.StartTestStep(testStep);
                loginPage.LogoutMPPortal(); testStep.SetOutput("Logout from Member Portal is Successful");
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                testCase.SetStatus(true);
            }
            catch (Exception e)
            {
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, false, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                testCase.SetStatus(false);
                testCase.SetErrorMessage(e.Message);
                testCase.SetImageContent(DriverContext.TakeScreenshot().ToString());
                Assert.Fail();
            }
            finally
            {
                testCase.SetTestCaseSteps(listOfTestSteps);
                testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow());
                listOfTestCases.Add(testCase);
            }
        }
Example #15
0
 public InternalStaffOrganizationAccountsPage(DriverContext driverContext)
     : base(driverContext)
 {
 }
Example #16
0
 public InternetPage(DriverContext driverContext)
     : base(driverContext)
 {
 }
        public static void SelectElementByText(By locator, string visibletext)
        {
            var dropdown = new SelectElement(DriverContext.GetDriver <IWebDriver>().FindElement(locator));

            dropdown.SelectByText(visibletext);
        }
 public ContextMenuPage(DriverContext driverContext)
     : base(driverContext)
 {
 }
 //public static void SelectElementByValue(By locator, string valueTexts)
 //{
 //    select = new SelectElement(GenericHelper.GetElement(locator));
 //    select.SelectByValue(valueTexts);
 //}
 public static void SelectElementByValue(By locator, string valueTexts)
 {
     select = new SelectElement(DriverContext.GetDriver <IWebDriver>().FindElement(locator));
     select.SelectByValue(valueTexts);
 }
        public void BTA225_Navigator_Email_Create_Update_Delete_EmailMessages()
        {
            #region Objects
            ProjectBasePage basePages = new ProjectBasePage(driverContext);
            testCase        = new TestCase(TestContext.TestName);
            listOfTestSteps = new List <TestStep>();
            testStep        = new TestStep();
            string stepName = "";
            bool   StepStatus;
            login.UserName = NavigatorUsers.NonAdminUser;
            login.Password = NavigatorUsers.NavigatorPassword;
            NonAdminUserData EmailInfo        = new NonAdminUserData(driverContext);
            string           EmailMessageName = ProjectBasePage.Orgnization_value + EmailInfo.EmailMessageName + "_" + RandomDataHelper.RandomString(4);;
            string           Description      = "Description";
            string           DMCCode          = EmailInfo.DMCCode;
            #endregion

            try
            {
                #region Step1:Launch Navigator Portal
                stepName = "Launch Navigator URL";
                testStep = TestStepHelper.StartTestStep(testStep);
                var navigator_LoginPage = new Navigator_LoginPage(DriverContext);
                navigator_LoginPage.LaunchNavigatorPortal(login.Url, out string LaunchMessage); testStep.SetOutput(LaunchMessage);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step2:Login As User Admin User
                stepName = "Login As User Admin User and Navigate to Home page by selecting Organization and Environment";
                testStep = TestStepHelper.StartTestStep(testStep);
                navigator_LoginPage.Login(login, Users.AdminRole.USER.ToString(), out string stroutput); testStep.SetOutput(stroutput);
                var navigator_UsersHomePage = new Navigator_UsersHomePage(DriverContext);
                navigator_UsersHomePage.Navigator_Users_SelectOrganizationEnvironment();
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step3:Navigating Email Page
                stepName = "Navigating Email Page";
                testStep = TestStepHelper.StartTestStep(testStep);
                var Website = new Application_Nav_Util_Page(DriverContext);
                Website.OpenApplication(NavigatorEnums.ApplicationName.email);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step4:Create new MailingName Messsage, if the MailingName is not existed
                stepName = "Create new MailingName Messsage, if the MailingName is not existed ";
                testStep = TestStepHelper.StartTestStep(testStep);
                var EmailPage = new Navigator_EmailMessagePage(DriverContext);
                StepStatus = EmailPage.CreateNewEmailMessage(EmailMessageName, Description, DMCCode, out string stepoutput);
                testStep.SetOutput(stepoutput);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, StepStatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step5:Update and Verify if the Mailing Description Updated with new description
                stepName    = "Update and Verify if the Mailing Description Updated with new description";
                testStep    = TestStepHelper.StartTestStep(testStep);
                Description = "UpdatedDescription";
                StepStatus  = EmailPage.UpdateEmailMessage(EmailMessageName, Description, DMCCode, out string UpdateStatus);
                testStep.SetOutput(UpdateStatus);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, StepStatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step6:Delete and Verify if the Mail deleted successfully or not
                stepName    = "Delete and Verify if the Mail deleted successfully or not";
                testStep    = TestStepHelper.StartTestStep(testStep);
                Description = "UpdatedDescription";
                StepStatus  = EmailPage.DeleteEmailMessage(EmailMessageName, Description, DMCCode, out string deleteStatus);
                testStep.SetOutput(deleteStatus);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, StepStatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step7: LogOut
                stepName = "Logout as USER Admin With All roles";
                testStep = TestStepHelper.StartTestStep(testStep);
                navigator_LoginPage.Logout();
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                testCase.SetStatus(true);
            }
            catch (Exception e)
            {
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName + e, false, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                testCase.SetStatus(false);
                testCase.SetErrorMessage(e.Message);
                testCase.SetImageContent(DriverContext.TakeScreenshot().ToString());
                Assert.Fail();
            }
            finally
            {
                testCase.SetTestCaseSteps(listOfTestSteps);
                testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow());
                listOfTestCases.Add(testCase);
            }
        }
 public FloatingMenuPage(DriverContext driverContext)
     : base(driverContext)
 {
     Logger.Info("Waiting for File Download page to open");
     //// this.Driver.IsElementPresent(this.floatingMenuPageText, BaseConfiguration.ShortTimeout);
 }
Example #22
0
        public TestStep Enter_EmptyValuesInPasswordFieldsOnLoginPasswordChange(List <TestStep> listOfTestSteps)
        {
            string stepName = "Verify Valid Error Message Appeared When Password Values are Empty";

            testStep = TestStepHelper.StartTestStep(testStep);
            try
            {
                Enter_EmptyValuesInPasswordFieldsOnLoginPasswordChange("Value required.", "Value required.", "Value required.", out string Message);
                testStep.SetOutput(Message);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                return(testStep);
            }
            catch (Exception e)
            {
                testStep.SetOutput(e.Message);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, false, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                throw new Exception(e.Message);
            }
        }
Example #23
0
        public void BTA239_CDIS_RedemMemberCouponById_Positive()
        {
            testCase        = new TestCase(TestContext.TestName);
            listOfTestSteps = new List <TestStep>();
            testStep        = new TestStep();
            String stepName = "";

            try
            {
                Logger.Info("Test Method Started");
                Common common = new Common(this.DriverContext);
                CDIS_Service_Methods cdis_Service_Method = new CDIS_Service_Methods(common);

                testStep = TestStepHelper.StartTestStep(testStep);
                stepName = "Adding member with CDIS service";
                Member output = cdis_Service_Method.GetCDISMemberGeneral();
                testStep.SetOutput("IpCode: " + output.IpCode + ", Name: " + output.FirstName);
                Logger.Info("IpCode:" + output.IpCode + ",Name:" + output.FirstName);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);
                IList <VirtualCard> vc = output.GetLoyaltyCards();

                testStep = TestStepHelper.StartTestStep(testStep);
                stepName = "Getting Coupon Definitions from GetCouponDefinitions method";
                GetCouponDefinitionsOut def = cdis_Service_Method.GetCouponDefinitions();
                testStep.SetOutput("First Coupon Name : " + def.CouponDefinition[0].Name);
                Logger.Info("First Coupon Name : " + def.CouponDefinition[0].Name);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);

                testStep = TestStepHelper.StartTestStep(testStep);
                stepName = "Adding Coupon to a member using AddMemberCoupon";
                long memberCouponId = cdis_Service_Method.AddMemberCoupon(vc[0].LoyaltyIdNumber, def.CouponDefinition[0].Id);
                testStep.SetOutput("Coupon is added to member and the MemberCouponId is : " + memberCouponId);
                Logger.Info("MemberCoupon Id : " + memberCouponId);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);


                testStep = TestStepHelper.StartTestStep(testStep);
                stepName = "Get Number of times Coupons used before redeeming using GetMemberCoupons method";
                MemberCouponStruct[] memberCoupons = cdis_Service_Method.GetMemberCoupons(vc[0].LoyaltyIdNumber);
                testStep.SetOutput("Number of times Coupon Used is : " + memberCoupons[0].TimesUsed);
                Logger.Info("Number of times Coupon Used is  : " + memberCoupons[0].TimesUsed);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);

                testStep = TestStepHelper.StartTestStep(testStep);
                stepName = "Redeeming the Coupon of by ID using RedeemMemberCouponById";
                RedeemMemberCouponByIdOut redeemMemberCoupons = cdis_Service_Method.RedeemMemberCouponById(memberCouponId);
                testStep.SetOutput("Loyalty Id number of the member is : " + redeemMemberCoupons.MemberIdentity + " and the number of the Usages left for Redemption: " + redeemMemberCoupons.NumberOfUsesLeft);
                Logger.Info("Loyalty Id number of the member is : " + redeemMemberCoupons.MemberIdentity + " And the number of the Usages left for Redemption: " + redeemMemberCoupons.NumberOfUsesLeft);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);

                testStep = TestStepHelper.StartTestStep(testStep);
                stepName = "Get Number of times Coupons used before redeeming using GetMemberCoupons methode";
                MemberCouponStruct[] memberCouponsnew = cdis_Service_Method.GetMemberCoupons(vc[0].LoyaltyIdNumber);
                Assert.AreEqual(memberCoupons[0].TimesUsed + 1, memberCouponsnew[0].TimesUsed, "Expected Value is :" + (memberCoupons[0].TimesUsed + 1), " Actual Value is : " + memberCouponsnew[0].TimesUsed);
                testStep.SetOutput("TimesUsed: Expected value is :" + (memberCoupons[0].TimesUsed + 1) + " and Actual Value is : " + memberCouponsnew[0].TimesUsed);
                Logger.Info("Number of times Coupon Used is  : " + memberCouponsnew[0].TimesUsed);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);

                testStep = TestStepHelper.StartTestStep(testStep);
                stepName = "Validate the redemptiondate from GetMemberCoupons Method";
                Assert.AreEqual(System.DateTime.Now.ToString("MM/dd/yyyy"), memberCouponsnew[0].DateRedeemed.Value.ToString("MM/dd/yyyy"), "Expected Value is :" + System.DateTime.Now.ToString("MM/dd/yyyy"), " Actual Value is : " + memberCouponsnew[0].DateRedeemed.Value.ToString("MM/dd/yyyy"));
                testStep.SetOutput("Redemption Date: Expected value is :" + System.DateTime.Now.ToString("MM/dd/yyyy") + " and Actual Value is : " + memberCouponsnew[0].DateRedeemed.Value.ToString("MM/dd/yyyy"));
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);

                testStep = TestStepHelper.StartTestStep(testStep);
                stepName = "Validate redemptiondate in LW_MEMBERCOUPON table and redemption record has been created in LW_MemberCouponRedemption";
                string dbresponse  = DatabaseUtility.GetFromSoapDB("LW_MEMBERCOUPON", "ID", memberCouponId.ToString(), "DATEREDEEMED", string.Empty);
                string dbresponse1 = DatabaseUtility.GetFromSoapDB("LW_MemberCouponRedemption", "MemberCouponID", memberCouponId.ToString(), "DATEREDEEMED", string.Empty);
                Assert.AreEqual(memberCouponsnew[0].DateRedeemed.ToString(), dbresponse, "Expected Value is :" + memberCouponsnew[0].DateRedeemed.ToString(), " Actual Value is : " + dbresponse);
                testStep.SetOutput("Redemption Date: from the response of GetMemberCoupons :" + memberCouponsnew[0].DateRedeemed + " and from DB (LW_MEMBERCOUPON) : " + dbresponse +
                                   ";Verified the record in LW_MemberCouponRedemption and captured redemption date : " + dbresponse1);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);


                testCase.SetStatus(true);
            }

            catch (Exception e)
            {
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, false, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);
                testCase.SetStatus(false);
                testCase.SetErrorMessage(e.Message);
                Assert.Fail(e.Message);
            }
            finally
            {
                testCase.SetTestCaseSteps(listOfTestSteps);
                testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow());
                listOfTestCases.Add(testCase);
            }
        }
Example #24
0
        public void BTA_273_CSP_RequestCredit_Store_StoreNumber()
        {
            ProjectBasePage basePages = new ProjectBasePage(driverContext);

            testCase        = new TestCase(TestContext.TestName);
            listOfTestSteps = new List <TestStep>();
            testStep        = new TestStep();
            string stepName                     = "";
            bool   stepstatus                   = true;
            var    CSPortal_RequestCredit       = new CSPortal_RequestCredit(DriverContext);
            var    CSPMemberAccountActivityPage = new CSPortal_MemberAccountActivityPage(DriverContext);
            var    CSP_HomePage                 = new CSPortal_HomePage(DriverContext);
            var    CSPAccountSummaryPage        = new CSPortal_MemberAccountSummaryPage(DriverContext);
            var    CSP_LoginPage                = new CSPortal_LoginPage(DriverContext);

            try
            {
                #region reading Data from dB
                List <string> TransactionList = new List <string>();
                stepName = "Searching Transaction in the Transaction History Details Table";
                testStep = TestStepHelper.StartTestStep(testStep);
                var CSPSearchPage = new CSPortal_SearchPage(DriverContext);
                TransactionList = ProjectBasePage.GetTransactionDetailsFromTransationHistoryTableFromDB(out Step_Output);
                RequestCredit_Search_Criteria.TransactionNumber = TransactionList[0].ToString();
                RequestCredit_Search_Criteria.RegisterNumber    = TransactionList[1].ToString();
                RequestCredit_Search_Criteria.TxnAmount         = TransactionList[2].ToString();
                RequestCredit_Search_Criteria.TxnDate           = TransactionList[3].ToString();
                RequestCredit_Search_Criteria.StoreNumber       = TransactionList[4].ToString();
                if (RequestCredit_Search_Criteria.StoreNumber.Equals(""))
                {
                    throw new Exception("Store Number Not Avaialble for Transaction:" + RequestCredit_Search_Criteria.TransactionNumber);
                }
                DateTime Txn_dateformat = DateTime.Parse(RequestCredit_Search_Criteria.TxnDate);
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Precondition:Create Member One
                testStep = TestStepHelper.StartTestStep(testStep);
                stepName = "Adding member with CDIS service";
                Member output = basePages.CreateMemberThroughCDIS();
                string LoyaltyNumber_One_Firstname = output.FirstName;
                string LoyaltyNumber_One           = basePages.GetLoyaltyNumber(output);
                testStep.SetOutput("LoyaltyNumber:" + LoyaltyNumber_One + ",Name:" + output.FirstName + "Created Successfully");
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step1:Launch CSPortal Portal
                stepName = "Launch Customer Service Portal URL";
                testStep = TestStepHelper.StartTestStep(testStep);;
                CSP_LoginPage.LaunchCSPortal(login.Csp_url, out Step_Output); testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step2:Login As csadmin
                stepName       = "Login As csadmin User";
                testStep       = TestStepHelper.StartTestStep(testStep);
                login.UserName = CsPortalData.csadmin;
                login.Password = CsPortalData.csadmin_password;
                CSP_LoginPage.LoginCSPortal(login.UserName, login.Password, out Step_Output); testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step3:Search Based on Loyalty ID
                stepName   = "Search Based on Loyalty ID";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSPSearchPage.Search_BasedOnLoyaltyID(LoyaltyNumber_One, out Step_Output);
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step4:Select and Verify Loyalty ID
                stepName = "Select and Verify Loyalty ID";
                testStep = TestStepHelper.StartTestStep(testStep);
                CSPSearchPage.Select(LoyaltyNumber_One_Firstname);
                stepstatus = CSPAccountSummaryPage.VerifyLoyaltyId(LoyaltyNumber_One, out Step_Output);
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step5:Navigate to Request Credit
                stepName   = "Navigate to Request Credit Page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_HomePage.NavigateToDashBoardMenu(CSPortal_HomePage.DashBoard.RequestCredit, out Step_Output);
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step6:Search With Store Number
                stepName   = "Search With Store Number:" + RequestCredit_Search_Criteria.StoreNumber;
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSPortal_RequestCredit.Search_Store_BasedOnStoreNumber(RequestCredit_Search_Criteria.TransactionNumber, RequestCredit_Search_Criteria.StoreNumber, out Step_Output);
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step7:Get the data from DB
                stepName = "Searching Transaction in the Txn_Header Table";
                List <string> TransactionList_Header = new List <string>();
                testStep = TestStepHelper.StartTestStep(testStep);
                TransactionList_Header = ProjectBasePage.GetTransactionDetailsFromTransactionHeaderTableFromDB(RequestCredit_Search_Criteria.TransactionNumber, out Step_Output);
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step8:Verify the Transactions
                stepName   = "Verifying Transaction in Txn_Header table";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = basePages.VerifyInputandOutputFromDB("Transaction Number", TransactionList_Header[0].ToString(), RequestCredit_Search_Criteria.TransactionNumber, out Step_Output);
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));

                listOfTestSteps.Add(testStep);
                #endregion

                #region Step9:Navigate to Account Activity Page
                stepName   = "Navigate to Account ActivityPage";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_HomePage.NavigateToDashBoardMenu(CSPortal_HomePage.DashBoard.AccountActivity, out Step_Output);
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step10:Search and Verify Purchase History of First Transaction With Specific Date Range
                stepName = "Search and Verify Purchase History ";
                testStep = TestStepHelper.StartTestStep(testStep);
                Txn_dateformat.ToString("MMddyyyy");
                CSPMemberAccountActivityPage.SelectDate_RC(Txn_dateformat, Txn_dateformat);
                testStep.SetOutput(CSPMemberAccountActivityPage.VerifyPurchaseHistoryBasedonHeader(RequestCredit_Search_Criteria.TransactionNumber));
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step11:Logout As csadmin
                stepName = "Logout As csadmin";
                testStep = TestStepHelper.StartTestStep(testStep);
                CSP_HomePage.LogoutCSPortal(); testStep.SetOutput("Logout As csadmin is Successful");
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion
                testCase.SetStatus(true);
            }

            catch (Exception e)
            {
                testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName + e, false, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                testCase.SetStatus(false);
                testCase.SetErrorMessage(e.Message);
                testCase.SetImageContent(DriverContext.TakeScreenshot().ToString());
                Assert.Fail();
            }
            finally
            {
                testCase.SetTestCaseSteps(listOfTestSteps);
                testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow());
                listOfTestCases.Add(testCase);
            }
        }
 public KendoDropDownListPage(DriverContext driverContext)
     : base(driverContext)
 {
 }
 public Transactions()
 {
     PageFactory.InitElements(DriverContext.GetDriver <IWebDriver>(), this);
 }
Example #27
0
        public void BTA_52_Navigator_Migrate_Coupon_VerifyDeselectOfIsGlobalFalgMigratedCorrectly()
        {
            #region Object Initialization
            CategoryFields coupon    = new CategoryFields();
            Migration      Migration = new Migration(driverContext);

            ProjectBasePage  basePages   = new ProjectBasePage(driverContext);
            var              couponData  = new NonAdminUserData(driverContext);
            NonAdminUserData WebsiteData = new NonAdminUserData(driverContext);
            var              application_Nav_Util_Page                       = new Application_Nav_Util_Page(DriverContext);
            var              navigator_Users_ProgramPage                     = new Navigator_Users_ProgramPage(DriverContext);
            var              navigator_Users_Program_ComponentsPage          = new Navigator_Users_Program_ComponentsPage(DriverContext);
            var              navigator_Users_Program_eCollateralPage         = new Navigator_Users_Program_eCollateralPage(DriverContext);
            var              navigator_CreateCoupon_Category                 = new Navigator_Users_Program_Components_CategoriesPage(DriverContext);
            var              navigator_Users_Program_eCollateral_CouponsPage = new Navigator_Users_Program_eCollateral_CouponsPage(DriverContext);
            string           CouponName = Migration.MigrationCouponame;
            string           randomStr  = RandomDataHelper.RandomString(4);
            coupon.Name         = CouponName + randomStr;
            coupon.CouponCode   = "";
            coupon.CategoryName = Migration.MigrationCouponCategoryName;

            coupon.StartDate         = DateHelper.GetDate("Current");
            coupon.ExpiryDate        = DateHelper.GetDate("Future");
            coupon.UsesAllowed       = RandomDataHelper.RandomNumber(2).ToString();
            coupon.CategoryTypeValue = CategoryFields.CategoryType.Coupon.ToString();
            coupon.SetType           = CategoryFields.Property.Name.ToString();
            coupon.MultiLanguage     = CategoryFields.Languages.English.ToString();
            coupon.ChannelProperties = CategoryFields.Channel.Web.ToString();
            coupon.IsGlobal          = "unchecked";
            testCase        = new TestCase(TestContext.TestName);
            listOfTestSteps = new List <TestStep>();
            testStep        = new TestStep();
            string stepName = "";
            #endregion

            try
            {
                #region Step1:Launch Navigator Portal
                stepName = "Launch Navigator URL";
                testStep = TestStepHelper.StartTestStep(testStep);
                var navigator_LoginPage = new Navigator_LoginPage(DriverContext);
                navigator_LoginPage.LaunchNavigatorPortal(login.Url, out string LaunchMessage); testStep.SetOutput(LaunchMessage);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step2:Login As User Admin User
                stepName       = "Login As User Admin User and Navigate to Home page by selecting Organization and Environment";
                testStep       = TestStepHelper.StartTestStep(testStep);
                login.UserName = NavigatorUsers.NonAdminUser;
                login.Password = NavigatorUsers.NavigatorPassword;
                navigator_LoginPage.Login(login, Users.AdminRole.USER.ToString(), out string stroutput); testStep.SetOutput(stroutput);
                var navigator_UsersHomePage = new Navigator_UsersHomePage(DriverContext);
                navigator_UsersHomePage.Navigator_Users_SelectOrganizationEnvironment();
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step3:Create Category with Coupon if not Exists in Dev environment
                stepName = "Create new Category for " + coupon.CategoryTypeValue;
                testStep = TestStepHelper.StartTestStep(testStep);
                basePages.VerifyCategory_IfNotExistedCreateNew(ProjectBasePage.Env_value, coupon, CategoryFields.CategoryType.Coupon.ToString(), out string stepoutput);
                testStep.SetOutput(stepoutput);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step4: Create new Coupon in Dev  environment
                stepName = "Create Coupon with a category " + coupon.CategoryTypeValue;
                testStep = TestStepHelper.StartTestStep(testStep);
                application_Nav_Util_Page.OpenApplication(NavigatorEnums.ApplicationName.program);
                navigator_Users_ProgramPage.NavigateToProgramTab(Navigator_Users_ProgramPage.ProgramTabs.eCollateral);
                navigator_Users_Program_eCollateralPage.NavigateToProgramECollateralTab(Navigator_Users_Program_eCollateralPage.eCollateralTabs.Coupons);
                testStep.SetOutput(navigator_Users_Program_eCollateral_CouponsPage.CreateCoupon(coupon));
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step5: Switch to Migration Environment
                stepName = "Switching to Migration Environment :" + Migration.MigrationEnvironment;
                testStep = TestStepHelper.StartTestStep(testStep);
                navigator_UsersHomePage.Navigator_Users_SwitchEnvironment();
                navigator_UsersHomePage.Navigator_Users_SelectOrganizationEnvironment(Migration.MigrationEnvironment, Migration.MigrationOrderId, out string _output); testStep.SetOutput(_output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step6:Create Category with Coupon if not Exists in QA environment
                stepName = "Create new Category as " + coupon.CategoryTypeValue + ", if not exists.";
                testStep = TestStepHelper.StartTestStep(testStep);
                bool CategoryAlreadyMigrated = true;
                if (!basePages.VerifyCategory_IfNotExistedCreateNew(Migration.MigrationEnvironment, coupon, CategoryFields.CategoryType.Coupon.ToString(), out stepoutput, true))
                {
                    CategoryAlreadyMigrated = false;
                }
                testStep.SetOutput(stepoutput);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step7: Navigate to Migration Page and Delete Migration Set if any
                stepName = "Navigate to Migration Page and Delete Migration Set if any";
                testStep = TestStepHelper.StartTestStep(testStep);
                application_Nav_Util_Page.OpenApplication(NavigatorEnums.ApplicationName.migration);
                Navigator_MigrationPage _MigrationPage = new Navigator_MigrationPage(DriverContext);
                Migration.BuildMigrationSetName = Migration.MigrationSets.Migration_Coupon_Default.ToString() + "_" + DateHelper.GetDate("Current");
                _MigrationPage.DeleteIfMigrationSetExists(Migration.MigrationSets.Migration_Coupon_Default.ToString(), out string output);
                testStep.SetOutput(output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step8:Create  New Migration Set
                stepName = "Create  New Migration Set";
                testStep = TestStepHelper.StartTestStep(testStep);
                _MigrationPage.MigrationSetCreation(Migration.BuildMigrationSetName, out output);
                testStep.SetOutput(output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step9:Edit Items and Generate Items
                stepName = "Edit Items and Generate Items";
                testStep = TestStepHelper.StartTestStep(testStep);
                //_MigrationPage.EditItems(Migration.BuildMigrationSetName, ProjectBasePage.Env_value,DateHelper.GeneratePastTimeStampBasedonMin(2));
                _MigrationPage.EditItems_All(Migration.BuildMigrationSetName, ProjectBasePage.Env_value, DateHelper.GeneratePastTimeStampBasedonMin(2));
                _MigrationPage.SelectItemsForCouponDef(CategoryAlreadyMigrated, coupon.CategoryName, coupon.Name, out _output);
                testStep.SetOutput(_output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step10:Initiate Migration Set
                stepName = "Initiate Migration Set";
                testStep = TestStepHelper.StartTestStep(testStep);
                _MigrationPage.InitiateMigrationSet(Migration.BuildMigrationSetName, out output);
                testStep.SetOutput(output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step11:Approve Migration Set
                stepName = "Approve Migration Set";
                testStep = TestStepHelper.StartTestStep(testStep);
                _MigrationPage.ApproveMigrationSet(Migration.BuildMigrationSetName, out output);
                testStep.SetOutput(output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step12:Run Migration Set
                stepName = "Run Now Migration Set";
                testStep = TestStepHelper.StartTestStep(testStep);
                _MigrationPage.RunNowMigrationSet(Migration.BuildMigrationSetName, out output);
                testStep.SetOutput(output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step13:Verify Coupon Migrated  on Coupon Page
                stepName = "Verify Coupon Migrated on Coupon Page";
                testStep = TestStepHelper.StartTestStep(testStep);
                application_Nav_Util_Page.OpenApplication(NavigatorEnums.ApplicationName.program);
                navigator_Users_ProgramPage.NavigateToProgramTab(Navigator_Users_ProgramPage.ProgramTabs.eCollateral);
                navigator_Users_Program_eCollateralPage.NavigateToProgramECollateralTab(Navigator_Users_Program_eCollateralPage.eCollateralTabs.Coupons);
                navigator_Users_Program_eCollateral_CouponsPage.VerifyCreatedCoupon(coupon.SetType, coupon.Name, coupon.CategoryName);
                testStep.SetOutput(" Coupon :" + coupon.Name + " Migrated Successfully and Appeared on Coupon Page");
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step14:Verify the Is Global checkbox is unchecked
                stepName = "Verify the Is Global checkbox is unchecked";
                testStep = TestStepHelper.StartTestStep(testStep);
                if (!navigator_Users_Program_eCollateral_CouponsPage.VerifyISGlobalCheckedorNot(coupon.Name))
                {
                    testStep.SetOutput("Global checkbox is unchecked for the coupon: " + coupon.Name);
                }
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step15:Verify Coupon Category Migrated  on Categories Page
                stepName = "Verify Coupon Category Migrated  on Categories Page";
                testStep = TestStepHelper.StartTestStep(testStep);
                if (!basePages.VerifyCategory_IfNotExistedCreateNew(Migration.MigrationEnvironment, coupon, CategoryFields.CategoryType.Coupon.ToString(), out stepoutput, true))
                {
                    throw new Exception("Failed to Migrate Category:" + Migration.MigrationCouponCategoryName);
                }
                testStep.SetOutput(stepoutput);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step16: Logout
                stepName = "Logout from USER page";
                testStep = TestStepHelper.StartTestStep(testStep);
                navigator_LoginPage.Logout();
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                testCase.SetStatus(true);
            }

            catch (Exception e)
            {
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, false, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                testCase.SetStatus(false);
                testCase.SetErrorMessage(e.Message);
                testCase.SetImageContent(DriverContext.TakeScreenshot().ToString());
                Assert.Fail();
            }
            finally
            {
                testCase.SetTestCaseSteps(listOfTestSteps);
                testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow());
                listOfTestCases.Add(testCase);
            }
        }
Example #28
0
 public SearchByCategoryPage(DriverContext driverConfig) : base(driverConfig)
 {
 }
 public TabsNavigationPage(DriverContext driverContext) : base(driverContext)
 {
     DriverContext.Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
 }
Example #30
0
 public DynamicLoadingPage(DriverContext driverContext)
     : base(driverContext)
 {
 }
 public ProjectPageBase(DriverContext driverContext)
 {
     this.DriverContext = driverContext;
     this.Driver        = driverContext.Driver;
 }
Example #32
0
        public void BTA140_CSP_UpdateMemberAnd_VerifyMember()
        {
            ProjectBasePage basePages = new ProjectBasePage(driverContext);

            testCase        = new TestCase(TestContext.TestName);
            listOfTestSteps = new List <TestStep>();
            testStep        = new TestStep();
            string        stepName = "";
            bool          stepstatus;
            string        stepOutput = "";
            MemberProfile MP_Model   = new MemberProfile(DriverContext);

            try
            {
                #region Precondtion:Create Members
                testStep = TestStepHelper.StartTestStep(testStep);
                stepName = "Adding member with CDIS service";
                Member output = basePages.CreateMemberThroughCDIS();
                testStep.SetOutput("IpCode:" + output.IpCode + ",Name:" + output.FirstName);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("API"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Generating Test Data to Create new user with loyalty card
                Member        member  = MP_Model.GenerateMemberBasicInfo();
                MemberDetails details = MP_Model.GenerateMemberDetails();
                #endregion

                #region Step1:Launch CSPortal Portal
                stepName = "Launch Customer Service Portal URL";
                testStep = TestStepHelper.StartTestStep(testStep);
                var CSP_LoginPage = new CSPortal_LoginPage(DriverContext);
                CSP_LoginPage.LaunchCSPortal(login.Csp_url, out string Step_Output); testStep.SetOutput(Step_Output);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step2:Login As csadmin
                stepName       = "Login As csadmin User";
                testStep       = TestStepHelper.StartTestStep(testStep);
                login.UserName = CsPortalData.csadmin;
                login.Password = CsPortalData.csadmin_password;
                CSP_LoginPage.LoginCSPortal(login.UserName, login.Password, out Step_Output); testStep.SetOutput(Step_Output);
                testStep.SetOutput("Login As csadmin User is Successful");
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step3:Search Based on Loyalty ID
                stepName = "Search Based on Loyalty ID";
                testStep = TestStepHelper.StartTestStep(testStep);
                var CSPSearchPage = new CSPortal_SearchPage(DriverContext);
                stepstatus = CSPSearchPage.Search_BasedOnLoyaltyID(basePages.GetLoyaltyNumber(output), out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step4:Select and Verify Loyalty ID
                stepName = "Select and Verify Loyalty ID";
                testStep = TestStepHelper.StartTestStep(testStep);
                CSPSearchPage.Select(output.FirstName);
                var CSPAccountSummaryPage = new CSPortal_MemberAccountSummaryPage(DriverContext);
                stepstatus = CSPAccountSummaryPage.VerifyLoyaltyId(basePages.GetLoyaltyNumber(output), out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step5:Navigate to Member Update
                stepName = "Navigate to Member Update Profile";
                var CSP_HomePage = new CSPortal_HomePage(DriverContext);
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_HomePage.NavigateToDashBoardMenu(CSPortal_HomePage.DashBoard.UpdateProfile, out stepOutput);
                testStep.SetOutput(stepOutput);
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step6:Update Basic Info
                stepName = "Update Basic Info Details on Member  Update Profile page";
                var CSP_UpdateProfilePage = new CSPortal_MemberUpdateProfilePage(DriverContext);
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_UpdateProfilePage.UpdateBasicInfo_Details(member.FirstName, member.LastName, member.MiddleName, details.Gender, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step7:Update Address
                stepName   = "Update  Address Info Details on Member  Update Profile page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_UpdateProfilePage.UpdateAddress_Details(details.AddressLineOne, details.AddressLineTwo, details.Country, details.StateOrProvince, details.City, details.ZipOrPostalCode, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step8:Update ContactInfo
                stepName   = "Update  Contact Info Details on Member  Update Profile page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_UpdateProfilePage.UpdateContactInfo_Details(member.PrimaryEmailAddress, member.PrimaryPhoneNumber, member.PrimaryPhoneNumber, member.PrimaryPhoneNumber, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step9:Select All Opt In/Out Check boxes to Update
                stepName   = "Select All Opt In/Out Check boxes to Update";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSP_UpdateProfilePage.UpdateOptIn_Out_Details("DirectMailOptIn", "EmailOptIn", "SmsOptIn", out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step10:Save Update profile  and Verify Loyalty ID
                stepName = "Update profile and Verify Loyalty ID on Account Summary Page";
                testStep = TestStepHelper.StartTestStep(testStep);
                CSP_UpdateProfilePage.SaveRegistration();
                stepstatus = CSPAccountSummaryPage.VerifyLoyaltyId(basePages.GetLoyaltyNumber(output), out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step11:Verify FirstName on Account Summary Page
                stepName   = "Verify FirstName on Account Summary Page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSPAccountSummaryPage.VerifyFirstName(member.FirstName, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step12:Verify Last tName on Account Summary Page
                stepName   = "Verify Last Name on Account Summary Page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSPAccountSummaryPage.VerifyLastName(member.LastName, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step13:Verify Primary Email Address on Account Summary Page
                stepName   = "Verify Primary Email Address on Account Summary Page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSPAccountSummaryPage.VerifyPrimaryEmail(member.PrimaryEmailAddress, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step14:Verify Address Line 1 on Account Summary Page
                stepName   = "Verify Address Line 1 on Account Summary Page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSPAccountSummaryPage.VerifyAddressLine1(details.AddressLineOne, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step15:Verify Address Line 2 on Account Summary Page
                stepName   = "Verify Address Line 2 on Account Summary Page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSPAccountSummaryPage.VerifyAddressLine2(details.AddressLineTwo, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step16:Verify City on Account Summary Page
                stepName   = "Verify City on Account Summary Page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSPAccountSummaryPage.VerifyCity(details.City, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step17:Verify State on Account Summary Page
                stepName   = "Verify State on Account Summary Page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSPAccountSummaryPage.VerifyState(details.StateOrProvince, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step18:Verify   Zip Code on Account Summary Page
                stepName   = "Verify 	Zip Code on Account Summary Page";
                testStep   = TestStepHelper.StartTestStep(testStep);
                stepstatus = CSPAccountSummaryPage.VerifyZipCode(details.ZipOrPostalCode, out stepOutput); testStep.SetOutput(stepOutput);
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                #region Step19:Logout As csadmin
                stepName = "Logout As csadmin";
                testStep = TestStepHelper.StartTestStep(testStep);
                CSP_HomePage.LogoutCSPortal();
                testStep.SetOutput("Logout is Successful");
                testStep = TestStepHelper.EndTestStep(testCase, testStep, stepName, true, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                #endregion

                testCase.SetStatus(true);
            }
            catch (Exception e)
            {
                stepstatus = false;
                testStep   = TestStepHelper.EndTestStep(testCase, testStep, stepName + e, stepstatus, DriverContext.SendScreenshotImageContent("WEB"));
                listOfTestSteps.Add(testStep);
                testCase.SetStatus(false);
                testCase.SetErrorMessage(e.Message);
                testCase.SetImageContent(DriverContext.TakeScreenshot().ToString());
                Assert.Fail();
            }
            finally
            {
                testCase.SetTestCaseSteps(listOfTestSteps);
                testCase.SetEndTime(new StringHelper().GetFormattedDateTimeNow());
                listOfTestCases.Add(testCase);
            }
        }
 public HoversPage(DriverContext driverContext)
     : base(driverContext)
 {
 }
Example #34
0
 public LoginPage(DriverContext driverContext)
     : base(driverContext)
 {
 }
 public DemoPageObjects(DriverContext driverContext) : base(driverContext)
 {
 }
 public ProtractorApiPage(DriverContext driverContext) : base(driverContext)
 {
 }
Example #37
0
 public InternalStaffCommitteeManagementPage(DriverContext driverContext)
     : base(driverContext)
 {
 }
 public FloatingMenuPage(DriverContext driverContext)
     : base(driverContext)
 {
     Logger.Info("Waiting for File Download page to open");
     //// this.Driver.IsElementPresent(this.floatingMenuPageText, BaseConfiguration.ShortTimeout);
 }
 public HoversPage(DriverContext driverContext)
     : base(driverContext)
 {
 }