public void TC_VerifyThirdPartyChallengePage() { thirdPartyChallenge = cmn.GetConfig("ThirdPartyChallenges").ElementAt(0)[1].ToLower(); challengeEnabled = cmn.GetConfig("ChallengesEnabled").ElementAt(0)[1].ToLower(); if (challengeEnabled.Equals("false") && thirdPartyChallenge.Equals("false")) { Assert.Ignore("Challenges not available for the client"); } else if (challengeEnabled.Equals("false") && thirdPartyChallenge.Equals("true")) { //To call the Page Login Method Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); Common com = new Common(); com.ClickChallengesMenu(); Page_Challenges pch = new Page_Challenges(softassertions); is_soft_assert = true; if (GlobalVariables.clientname.ToLower().Equals("nucor")) { pch.VerifyThirdPartypopup(); } else { pch.verifyHealthTrait(); } cmn.CloseHamMenu(); cmn.LogOut(); } }
public void TC_VerifySleepTracker() { if (GlobalVariables.clientname == "NUCOR") { Assert.Ignore("The current testcase is not available for the client" + GlobalVariables.clientname); } else { //To call the Page Login Method Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); Common trackermenu = new Common(); trackermenu.ClickTrackerMenu(); Page_SleepTracker sl = new Page_SleepTracker(softassertions); sl.VerifySleepTracker(); is_soft_assert = true; softassertions.AssertAll(); //Common logout = new Common(); //logout.LogOut(); } }
public void TC_VerifyAtChallengePage() { challengeEnabled = cmn.GetConfig("ChallengesEnabled").ElementAt(0)[1].ToLower(); incentiveEnabled = cmn.GetConfig("IncentiveEnabled").ElementAt(0)[1].ToLower(); if (challengeEnabled.Equals("false")) { Assert.Ignore("Challenges not available for the client"); } //To call the Page Login Method Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); if (incentiveEnabled.Equals("true")) { points = cmn.GetPoints(clientname); } Common com = new Common(); com.ClickChallengesMenu(); Page_Challenges pchal = new Page_Challenges(); Assert.IsTrue(pchal.VerifyChallengesPage()); }
public void TC_ValidateIncentiveHistory() { Common cmn = new Common(); string incentiveEnabled = cmn.GetConfig("IncentiveEnabled").ElementAt(0)[1].ToLower(); if (incentiveEnabled.Equals("false")) { Assert.Ignore("Incentives not enabled for client"); } Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); System.Threading.Thread.Sleep(20000); Page_Incentive pincentive = new Page_Incentive(softassertions); is_soft_assert = true; pincentive.ValidateHistoryData(); softassertions.AssertAll(); Common logout = new Common(); logout.LogOut(); }
public void TC_VerifyFinancialWellBeing() { Common cm = new Common(); List <string[]> fwbenabled = cm.GetConfig("FinancialWellBeing"); if (fwbenabled.ElementAt(0)[1].ToLower().Equals("false")) { Assert.Ignore("Feature is not available for client"); } else { Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); Common cmn = new Common(); cmn.ClickFinancialWellBeingMenu(); Page_FinancialWellBeing fwb = new Page_FinancialWellBeing(softassertions); fwb.VerifyFinancialWellBeingData(GlobalVariables.clientname); is_soft_assert = true; softassertions.AssertAll(); Common logout = new Common(); logout.LogOut(); } }
public void TC_FillHighRiskHA() { Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); Assert.IsTrue(haprompt.AtHaPrompt(), "Not at HA Prompt Page"); haprompt.GoToDashboard(); ha = new Page_FillHA(softassertions); Common cm = new Common(); int hraid = cm.GetHRAID(GlobalVariables.clientname.ToLower()); Console.WriteLine("HRAID : " + hraid); if (hraid == 89 || hraid == 66 || hraid == 81) { ha.setInputFileName("HRAID(89,66)HighRiskHAData"); } //else if (hraid == 84) // ha.setInputFileName("HRAID(Nucor)HighRiskHAData"); else if (hraid == 87) { ha.setInputFileName("HRAID(DG)HighRiskHAData"); } is_soft_assert = true; ha.FillHA(); softassertions.AssertAll(); }
//[Category("ProdSanity")] //[Category("Regression")] public void TC_VerifyMyNuteritionPages() { nutritionEnabled = cmn.GetConfig("NutritionApp").ElementAt(0)[1].ToLower(); if (nutritionEnabled.Equals("false")) { Assert.Ignore("Nutrition Apps not available for Client"); } //To call the Page Login Method Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); //points = cmn.GetPoints(); Common devices = new Common(); devices.ClickDevicesAndApps(); Page_DevicesAndApps pdevices = new Page_DevicesAndApps(); if ((GlobalVariables.clientname == "NUCOR") || (GlobalVariables.clientname == "Dollar General")) { string expected = "Start Tracking Your Nutrition Today"; string actual = pdevices.NavigateToMyNuterition(); Assert.AreEqual(expected, actual); } else { string expected = "Start Tracking Your Activity Today"; string actual = pdevices.NavigateToManageDevices(); Assert.AreEqual(expected, actual); } }
public void TC_VerifyWeightTracker() { Common config = new Common(); isenabled = config.GetConfig("IncentiveEnabled").ElementAt(0)[1].ToLower(); clientname = GlobalVariables.clientname; //To call the Page Login Method Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); if (isenabled.Equals("true")) { points = cmn.GetPoints(clientname); } Common trackermenu = new Common(); trackermenu.ClickTrackerMenu(); Page_WeightTracker pWeightTracker = new Page_WeightTracker(softassertions); pWeightTracker.GoToWeightTracker(); pWeightTracker.VerifyWeightTracker(GlobalVariables.clientname); is_soft_assert = true; softassertions.AssertAll(); //Common logout = new Common(); //logout.LogOut(); }
/// <summary> /// This testcase will Complete and Validate Weight Management Progress Check In /// This will first login to application and then start, complete and validate Progress Check In /// </summary> //[Test,Order(1)] //[Category("Regression")] public void TC_VerifyMandatoryQuestionsMessage() { Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); cmn.ClickProgressCheckinMenu(); Page_WeightProgressCheckIn pprogress = new Page_WeightProgressCheckIn(); List <string[]> result = pprogress.VerifyMandatoryQuestionsErrorMessage(); Assert.Multiple(() => { for (int i = 0; i < result.Count; i++) { bool textmatchresult = Convert.ToBoolean(result.ElementAt(i)[1]); string msg = result.ElementAt(i)[0]; Assert.IsTrue(textmatchresult, msg); } } ); cmn.CloseHamMenu(); //cmn.LogOut(); }
public void TC_VerifyMessageToCoachUI() { List <string[]> isEnabled = cmn.GetConfig("CoachingEnabled", "IncentiveEnabled"); incentiveEnabled = isEnabled.ElementAt(0)[2].ToLower(); coachingEnabled = isEnabled.ElementAt(0)[1].ToLower(); clientname = GlobalVariables.clientname; if (coachingEnabled.Equals("false") && !GlobalVariables.clientname.ToLower().Equals("arc")) { Assert.Ignore("Message to coach not available for client"); } Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); if (incentiveEnabled.Equals("true")) { points = cmn.GetPoints(clientname); } //Click on Message to coach icon on Dashboard Common pcommon = new Common(); pcommon.GoToMessageToCoachPage(); //Call Verify Message Page UI Elements Page_MessageToCoach pmsgcoach = new Page_MessageToCoach(softassertions); pmsgcoach.VerifyMessagetoCoachPage(); is_soft_assert = true; softassertions.AssertAll(); //Common logout = new Common(); //logout.LogOut(); }
public void TC_VerifyCustomLoginNucor() { //To call the Page Login Method if (GlobalVariables.clientname.ToLower().Equals("nucor")) { if ((GlobalVariables.environment.ToLower().Equals("prod")) || (GlobalVariables.environment.ToLower().Equals("Production"))) { SeleniumKeywords.NavigateToUrl("https://nucornuyou.com"); } else if ((GlobalVariables.environment.ToLower().Equals("staging")) || (GlobalVariables.environment.ToLower().Equals("sa"))) { SeleniumKeywords.NavigateToUrl("https://sa.nucornuyou.com"); } Page_Login plogin = new Page_Login(); System.Threading.Thread.Sleep(2000); plogin.CustomURLLogin(); Page_HAPrompt haprompt = new Page_HAPrompt(); Assert.IsTrue(haprompt.AtHaPrompt(), "Not at HA Prompt Page"); haprompt.GoToDashboard(); //To call the Page Login Method Page_Dashboard Dashboard = new Page_Dashboard(); Assert.IsTrue(Dashboard.AtDashboard()); Common logout = new Common(); logout.LogOut(); } else { Assert.Ignore("Feature is not avaibale for the client"); } }
public void WhenIAmOnTheDashboardPage() { Page_HAPrompt haprompt = new Page_HAPrompt(); Assert.IsTrue(haprompt.AtHaPrompt(), "Not at HA Prompt Page"); haprompt.GoToDashboard(); }
public void TC_MaintainWeightGoal() { coachingEnabled = cmn.GetConfig("CoachingEnabled").ElementAt(0)[1].ToLower(); if (coachingEnabled.Equals("false")) { Assert.Ignore("Coaching not available for client"); } CommonGoals cmngoal = new CommonGoals(softassertions); Page_MaintainWeightGoal mt = new Page_MaintainWeightGoal(softassertions); //cmn.ClickGoalMenu(); mt.InputWeight(); cmngoal.ClickStep1NextBtn(); is_soft_assert = true; mt.VerifyPlanScreen(); mt.VerifyActionsAdded(); System.Threading.Thread.Sleep(3000); cmngoal.ClickStep2NextBtn(); mt.VerifySetUpScreen(); cmngoal.ClickConfirmBtn(); mt.VerifyGoalComplete(); cmngoal.ClickRemoveBtn(); cmngoal.VerifyRemovePopUp(); cmngoal.ClickRemoveScreenYesBtn(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); Page_Dashboard dashbrd = new Page_Dashboard(); Assert.IsTrue(dashbrd.AtDashboard(), "Not Navigated to Dashboard"); }
public void TC_AcceptRequest() { string url = ConfigurationManager.AppSettings["baseurl"]; string username = ConfigurationManager.AppSettings["username2"]; string password = ConfigurationManager.AppSettings["password"]; cn.LoginUser(url, username, password); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); Common cmn = new Common(); cmn.ClickConnectionsMenu(); // Verify request recieved string firstname = ConfigurationManager.AppSettings["firstname"]; string lastname = ConfigurationManager.AppSettings["lastname"]; string name = firstname + " " + lastname; string uname = cn.GetUserFullName(); Assert.AreEqual(name, uname); // Accept request cn.ClickAcceptButton(); }
public void TC_ResendRequest() { string url = ConfigurationManager.AppSettings["baseurl"]; string username = ConfigurationManager.AppSettings["username"]; string password = ConfigurationManager.AppSettings["password"]; cn.LoginUser(url, username, password); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); Common cmn = new Common(); cmn.ClickConnectionsMenu(); // Search user string emailid = ConfigurationManager.AppSettings["emailid"]; string searchtext = cn.SearchUser(emailid); Assert.AreEqual(emailid, searchtext); // Send Request cn.VerifyUserRequest(ConfigurationManager.AppSettings["emailid"]); softassertions.AssertAll(); Common logout = new Common(); logout.LogOut(); }
public void TC_VerifyListOfWeightDevicesAndApps() { List <string[]> isEnabled = cmn.GetConfig("FitnessDevice", "IncentiveEnabled", "NutritionApp"); fitnessEnabled = isEnabled.ElementAt(0)[1].ToLower(); incentiveEnabled = isEnabled.ElementAt(0)[2].ToLower(); nutritionEnabled = isEnabled.ElementAt(0)[3].ToLower(); if (fitnessEnabled.Equals("false") && nutritionEnabled.Equals("false")) { Assert.Ignore("Device and Apps not available for Client"); } if (GlobalVariables.clientname.ToLower().Equals("onlife health") || GlobalVariables.clientname.ToLower().Equals("health trust")) { //To call the Page Login Method //Login lgn = new Login(); //lgn.TC_VerifyLogin(); Page_HAPrompt haprompt = new Page_HAPrompt(); Common devices = new Common(); devices.ClickDevicesAndApps(); Page_DevicesAndApps pdevices = new Page_DevicesAndApps(Base.softassertions); //pdevices.NavigateToManageDevices(); List <String[]> devicename = CSVReaderDataTable.GetCSVData("DeviceAppContent", pageName, "weightdevicename"); pdevices.ClickOnWeightCheckBox(); for (int i = 0; i < devicename.Count; i++) { pdevices.VerifyWeightDevicesFromFilter(devicename.ElementAt(i)[4]); } is_soft_assert = true; softassertions.AssertAll(); } else { Assert.Ignore("Test Case skipped as Weight Devices not available for client"); } }
public void TC_VerifyMaintainWeightGoal() { Page_Login plogin = new Page_Login(); plogin.Login(); ExtentTestManager.GetTest().Info("Successfully Logged In"); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); Common cmn = new Common(); cmn.ClickGoalMenu(); Page_MaintainWeightGoal mwgoal = new Page_MaintainWeightGoal(); List <string[]> result = mwgoal.ValidateElements(); Assert.Multiple(() => { for (int i = 0; i < result.Count; i++) { bool textmatchresult = Convert.ToBoolean(result.ElementAt(i)[1]); string msg = result.ElementAt(i)[0]; Assert.IsTrue(textmatchresult, msg); } } ); }
public void TC_RemoveGoal() { cmngoal.ClickRemoveScreenYesBtn(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); cmn.LogOut(); }
//[Test,Order(1)] //[Category("Regression")] public void GoToDashboard() { Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); }
//[Test, Order(7)] //[Category("Regression")] public void TC_RemoveGoal() { CommonGoals cg = new CommonGoals(softassertions); cg.ClickRemoveScreenYesBtn(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); cmn.LogOut(); }
public void TC_RemoveGoal() { Page_MaintainWeightGoal screen = new Page_MaintainWeightGoal(); screen.RemoveGoal(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); cmn.LogOut(); }
public void TC_VerifySuccessfullRegistration() { is_soft_assert = false; //Navigate to Get Started Page Page_Registration reg = new Page_Registration(softassertions); reg.ClickGetStarted(); userinfo.Add(GlobalVariables.firstname); userinfo.Add(GlobalVariables.lastname); userinfo.Add(GlobalVariables.dob); userinfo.Add(GlobalVariables.zipcode); userinfo.Add(GlobalVariables.popseg1); userinfo.Add(GlobalVariables.ssn); // Enter details in get started page reg.FillGetStartedDetails(userinfo, additionalDetails); // Click User Agreement next button reg.ClickUAContinue(); isSSO = config.GetConfig("SSO"); //Update required fields reg.EnterRequiredFields(isSSO); //Click Save and Continue reg.ClickSaveAndContinue(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); Page_Dashboard Dashboard = new Page_Dashboard(); //Verify At Dashboard page Assert.IsTrue(Dashboard.AtDashboard()); Common cmn = new Common(); string sso = isSSO.ElementAt(0)[1]; TestContext.WriteLine("SSO: " + sso); if (sso.ToLower().Equals("true")) { //Create User for SSO Clients reg.CreateUsernamePassword(); } //Log Out //Common cmn = new Common(); cmn.LogOut(); }
public void TC_GoToNotificationPage() { Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); System.Threading.Thread.Sleep(8000); Page_Notifications pn = new Page_Notifications(); pn.ClickViewAllLink(); }
public void TC_VerifyConnectionName() { string expected = ConfigurationManager.AppSettings["firstname"] + " " + ConfigurationManager.AppSettings["lastname"] + "!"; Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); Page_MyProfile mp = new Page_MyProfile(); String actual = mp.VerifyMemberName(); Console.WriteLine("Expected user name is " + expected + " Actual is " + actual); Assert.AreEqual(expected, actual.Trim()); }
public void TC_VerifyQuitTobaccoProgressCheckIn() { //To call the Page Login Method Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); cmn.ClickProgressCheckinMenu(); Page_QuitTobaccoProgressCheckIn pqt = new Page_QuitTobaccoProgressCheckIn(softassertions); is_soft_assert = true; pqt.CompleteProgressCheckIn(); softassertions.AssertAll(); }
public void TC_VerifyLogout() { //To call the Page Login Method Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); Page_Dashboard Dashboard = new Page_Dashboard(); Assert.IsTrue(Dashboard.AtDashboard()); Common logout = new Common(); logout.LogOut(); }
public void TC_VerifyWeightManagementProgressCheckIn() { //To call the Page Login Method Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); cmn.ClickProgressCheckinMenu(); Page_WeightProgressCheckIn pprogress = new Page_WeightProgressCheckIn(softassertions); is_soft_assert = true; pprogress.CompleteProgressCheckIn(); softassertions.AssertAll(); }
public void TC_VerifyAtDashboard() { coachingEnabled = cmn.GetConfig("CoachingEnabled").ElementAt(0)[1].ToLower(); journeyEnabled = cmn.GetConfig("JourneyEnabled").ElementAt(0)[1].ToLower(); //To call the Page Login Method Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); //Page_Dashboard Dashboard = new Page_Dashboard(); // Assert.IsTrue(Dashboard.AtDashboard()); }
public void TC_RemoveQuitTobaccoGoal() { Common config = new Common(); string isenabled = config.GetConfig("CoachingEnabled").ElementAt(0)[1].ToLower(); if (isenabled.Equals("false")) { Assert.Ignore("Coaching not enabled for client"); } TC_VerifyRemovePopUp(); TC_RemoveGoal(); Page_HAPrompt haprompt = new Page_HAPrompt(); haprompt.GoToDashboard(); cmn.LogOut(); }
public void TC_VerifyHealthContentPage() { //To call the Page Login Method Page_Login plogin = new Page_Login(); plogin.Login(); Page_HAPrompt haprompt = new Page_HAPrompt(); //Assert.IsTrue(haprompt.AtHaPrompt(), "Not at HA Prompt Page"); haprompt.GoToDashboard(); // Health Content Common cmn = new Common(); cmn.ClickOnResources(); Page_HealthContent phc = new Page_HealthContent(); List <string[]> actualtxt = CSVReaderDataTable.GetCSVData("ResourcesContent", "HealthContent", "pageheading"); string atrval = phc.VerifyHealthContentPage(); Console.WriteLine("actualtxt" + atrval + "expected" + actualtxt.ElementAt(0)[4]); Assert.AreEqual(actualtxt.ElementAt(0)[4], atrval); // Symptom Checker Tab Page_SymptomChecker psc = new Page_SymptomChecker(); atrval = psc.VerifySymptomCheckerPageFromTab(); actualtxt = CSVReaderDataTable.GetCSVData("ResourcesContent", "SymptomChecker", "pageheading"); Console.WriteLine("actualtxt" + atrval + "expected" + actualtxt.ElementAt(0)[4]); Assert.AreEqual(actualtxt.ElementAt(0)[4], atrval); // Well Being Content Tab Page_WellBeingContent wbc = new Page_WellBeingContent(); atrval = wbc.VerifyWellBeingFromTab(); actualtxt = CSVReaderDataTable.GetCSVData("ResourcesContent", "Common", "pageheading"); Console.WriteLine("actualtxt" + atrval + "expected" + actualtxt.ElementAt(0)[4]); Assert.AreEqual(actualtxt.ElementAt(0)[4], atrval); //Family Content Page_FamilyContent fc = new Page_FamilyContent(); atrval = fc.VerifyFamilyContentFromTab(); actualtxt = CSVReaderDataTable.GetCSVData("ResourcesContent", "Common", "pageheading"); TestContext.WriteLine("expected" + actualtxt.ElementAt(0)[4]); TestContext.WriteLine("actualtxt" + atrval + "expected" + actualtxt.ElementAt(0)[4]); Assert.AreEqual(actualtxt.ElementAt(0)[4], atrval); }