public void VerifyTrackerChart()
 {
     ValidateChartExistence();
     ValidateChartFilters();
     SeleniumKeywords.RefreshPage();
     Thread.Sleep(2000);
 }
Esempio n. 2
0
        public void TC_MessageToCoach()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            coachingEnabled  = cmn.GetConfig("CoachingEnabled").ElementAt(0)[1].ToLower();
            incentiveEnabled = cmn.GetConfig("IncentiveEnabled").ElementAt(0)[1].ToLower();
            if (coachingEnabled.Equals("false"))
            {
                Assert.Ignore("Coaching not enabled for clients");
            }
            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();
            MessageToCoach mtc = new MessageToCoach();

            mtc.TC_VerifySentMsgToCoach();
            if (incentiveEnabled.Equals("true"))
            {
                mtc.TC_ValidatePoints();
            }
            mtc.TC_ValidateMessageToCoachIncentiveHistory();
            mtc.TC_VerifyMessageFilters();
        }
Esempio n. 3
0
        public void TC_FillWeightProgressCheckinFromCourse()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);
            if (incentiveEnabled.Equals("true"))
            {
                points = cmn.GetPoints(clientname);
            }
            Common coursemenu = new Common();

            coursemenu.ClickCourseMenu();
            Page_WeightManagementCourse pcourse = new Page_WeightManagementCourse();

            pcourse.NavigateToCourse();
            CommonCourses cmnc = new CommonCourses();

            cmnc.GoToProgressCheckin();
            Page_WeightProgressCheckIn pc     = new Page_WeightProgressCheckIn();
            List <string[]>            result = pc.VerifyProgressCheckIn();

            is_soft_assert = false;
            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);
                }
            }
                            );
        }
Esempio n. 4
0
        /// <summary>
        /// call in disconnect device test case
        /// </summary>
        public void VerifyDisConnectionDevice()
        {
            Boolean result = VerifyDisConnection();

            softAssertion.Add("Device Disconnected", result, true, "equals");
            result = verifyDeviceCount("0");
            softAssertion.Add("Device Count 0", result, true, "equals");
            SeleniumKeywords.RefreshPage();
        }
Esempio n. 5
0
        public void TC_Devices()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            string          incentiveEnabled;
            string          fitnessEnabled;
            string          nutritionEnabled;
            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 (incentiveEnabled.Equals("true"))
            {
                points = cmn.GetPoints(clientname);
            }
            Page_DevicesAndApps pdevices = new Page_DevicesAndApps();
            //pdevices.AcceptTOS();
            Common devices = new Common();
            //devices.ClickDevicesAndApps();
            string expected = "Start Tracking Your Activity Today";

            if (nutritionEnabled.Equals("true") && fitnessEnabled.Equals("false"))
            {
                expected = "Start Tracking Your Nutrition Today";
            }
            devices.ClickAddRemoveDevicesLabel();
            string actual = pdevices.NavigateToManageDevices();

            Assert.AreEqual(expected, actual);

            DevicesAndApps da = new DevicesAndApps();

            da.TC_VerifySearchFilter();
            da.TC_VerifyDeviceCountBeforeConnect();
            da.TC_VerifyListOfNutritionDevicesAndApps();
            da.TC_VerifyListOfWeightDevicesAndApps();
            da.TC_VerifyListOfFitnessDevicesAndApps();
            da.TC_VerifyLoginPageOfDevices();
            da.TC_VerifyConnectFitbitDevice();
            da.TC_VerifyDeviceCountAfterDeviceConnected();
            da.TC_VerifyRefreshConnection();
            da.TC_VerifyDisConnectDevice();
            //da.TC_VerifyDeviceFAQs();
            da.TC_ValidateDeviceAppsIncentiveHistory();
            da.TC_ValidatePoints();
        }
Esempio n. 6
0
        public void TC_VerifyTrackersSubMenu()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            cmn.ClickTrackerMenu();

            int             optionno = 27;
            Page_Dashboard  dashbrd  = new Page_Dashboard(softassertions);
            List <String[]> popupmsg = CSVReaderDataTable.GetCSVData("LeftmenuContent", "Dashboard", "trackersubmenu", "Common");

            dashbrd.Verify_LeftSubMenuOptions(popupmsg, optionno);
            is_soft_assert = true;
            softassertions.AssertAll();
        }
Esempio n. 7
0
        public void TC_VerifyProgressCheckInSubMenu()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            Common cmn = new Common();

            cmn.ClickProgressCheckinMenu();
            int             optionno = 39;
            Page_Dashboard  dashbrd  = new Page_Dashboard(softassertions);
            List <String[]> popupmsg = CSVReaderDataTable.GetCSVData("LeftmenuContent", "Dashboard", "progresschechinsubmenu", "Common");

            dashbrd.Verify_LeftSubMenuOptions(popupmsg, optionno);
            is_soft_assert = true;
            softassertions.AssertAll();
        }
Esempio n. 8
0
        public void TC_Resources()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);
            cmn.OpenHamMenu();
            cmn.ClickOnResourcesMenu();
            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);

            Resources rs = new Resources();

            rs.TC_VerifySymptomCheckerPage();
            rs.TC_VerifyWellBeingContentPage();
            rs.TC_VerifyReportsPage();
            rs.TC_VerifyAssessmentsPage();
            rs.TC_VerifyPHRPage();
        }
Esempio n. 9
0
        public void TC_VerifyGoalSubMenu()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            coachingEnabled = cmn.GetConfig("CoachingEnabled").ElementAt(0)[1].ToLower();
            if (coachingEnabled.Equals("false"))
            {
                Assert.Ignore("Coaching not available for client");
            }
            cmn.ClickGoalMenu();
            int             optionno = 16;
            Page_Dashboard  dashbrd  = new Page_Dashboard(softassertions);
            List <String[]> popupmsg = CSVReaderDataTable.GetCSVData("LeftmenuContent", "Dashboard", "coachingsubmenu", "Common");

            dashbrd.Verify_LeftSubMenuOptions(popupmsg, optionno);
            is_soft_assert = true;
            softassertions.AssertAll();
        }
Esempio n. 10
0
        public void TC_VerifyFinancialWellBeingContent()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            if ((clientname.Equals("group 44")))
            {
                Assert.Ignore("Feature is not available for client");
            }

            Common cmn = new Common();

            cmn.ClickFinancialWellBeingMenu();
            Page_FinancialWellBeing fwb = new Page_FinancialWellBeing(softassertions);

            fwb.VerifyFinancialWellBeingData(clientname);
            is_soft_assert = true;
            softassertions.AssertAll();
        }
Esempio n. 11
0
        public void TC_Settings()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            Common settings = new Common();

            settings.GoToSettings();
            Page_Settings myinf = new Page_Settings(softassertions);

            myinf.VerifyMyProfileErrors();
            is_soft_assert = true;
            softassertions.AssertAll();
            Setting set = new Setting();

            set.TC_VerifyMyProfileData();
            set.TC_VerifyErrorMessages();
            set.TC_VerifyUpdatedData();
        }
Esempio n. 12
0
        public void TC_VerifyDevicesSubMenu()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            List <string[]> isEnabled = cmn.GetConfig("FitnessDevice", "NutritionApp");

            deviceEnabled    = isEnabled.ElementAt(0)[1].ToLower();
            nutritionEnabled = isEnabled.ElementAt(0)[2].ToLower();
            if (deviceEnabled.Equals("false") && nutritionEnabled.Equals("false"))
            {
                Assert.Ignore("Device and Apps not available for client");
            }
            if (GlobalVariables.isregistered.ToLower().Equals("false"))
            {
                Page_DevicesAndApps pdevice = new Page_DevicesAndApps();
                pdevice.AcceptTOS();
            }
            if (clientname.Equals("dollar general"))
            {
                Assert.Ignore("Feature no availabe for the client");
            }
            else
            {
                cmn.ClickDevicesAndApps();

                int             optionno = 47;
                Page_Dashboard  dashbrd  = new Page_Dashboard(softassertions);
                List <String[]> popupmsg = null;

                if (clientname.Equals("health trust"))
                {
                    popupmsg = CSVReaderDataTable.GetCSVData("LeftmenuContent", "Dashboard", "devicesandapppssubmenu", clientname);
                }
                else
                {
                    popupmsg = CSVReaderDataTable.GetCSVData("LeftmenuContent", "Dashboard", "devicesandapppssubmenu", "Common");
                }

                dashbrd.Verify_LeftSubMenuOptions(popupmsg, optionno);
            }
        }
Esempio n. 13
0
        /// <summary>
        /// 1. Enters Data in the specified locators
        /// 2. Verifies History Header
        /// 3. Verifies first 3 values of Tracker in history
        /// </summary>
        /// <returns></returns>
        private void InputAndUpdateTrackerData()
        {
            List <string[]> trackerdata = CSVReaderDataTable.GetCSVData("InputDataContent", pageName, "choldata");
            List <string[]> historydata = CSVReaderDataTable.GetCSVData("CommonContent", pageName, "trackerhistoryheader");
            Common          date        = new Common(softAssertions);
            CommonTracker   chol        = new CommonTracker(softAssertions);

            date.VerifyDate();

            int totcholvalue = Convert.ToInt32(trackerdata.ElementAt(0)[4]);
            int ldlvalue     = Convert.ToInt32(trackerdata.ElementAt(1)[4]);
            int hdlvalue     = Convert.ToInt32(trackerdata.ElementAt(2)[4]);
            int trygvalue    = Convert.ToInt32(trackerdata.ElementAt(3)[4]);

            for (int i = 0; i <= 2; i++)
            {
                SeleniumKeywords.RefreshPage();
                System.Threading.Thread.Sleep(3000);
                SeleniumKeywords.SetText(pageName, trackerdata.ElementAt(0)[3], totcholvalue.ToString());
                SeleniumKeywords.SetText(pageName, trackerdata.ElementAt(1)[3], ldlvalue.ToString());
                SeleniumKeywords.SetText(pageName, trackerdata.ElementAt(2)[3], hdlvalue.ToString());
                SeleniumKeywords.SetText(pageName, trackerdata.ElementAt(3)[3], trygvalue.ToString());
                JavaScriptKeywords.SetTextByControlId("DataPointDate", date.GetDate()[i]);
                chol.ClickUpdateButton();
                chol.ClickViewHistory();
                if (i == 0)
                {
                    chol.ValidateHistoryHeader(historydata, pageName);
                    historydata = CSVReaderDataTable.GetCSVData("CommonContent", pageName, "trackerhistoryvalue");
                }

                String historytabledata = Convert.ToDateTime(date.GetDate()[i]).ToString("dddd, MMM dd yyyy") + "|" + totcholvalue.ToString() + "|" + ldlvalue.ToString() + "|" + hdlvalue.ToString() + "|" + trygvalue.ToString();
                historydata.ElementAt(0)[4] = historytabledata;

                chol.ValidateHistoryData(historydata, pageName);
                totcholvalue += 50;
                ldlvalue     += 30;
                hdlvalue     += 20;
                trygvalue    += -10;
            }
        }
Esempio n. 14
0
        public void TC_Notifications()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            Page_Notifications pn = new Page_Notifications();

            pn.ClickViewAllLink();
            List <string[]> result = pn.VerifyAllNotifications();

            Assert.Multiple(() =>
            {
                for (int i = 0; i < result.Count; i++)
                {
                    bool textmatch = Convert.ToBoolean(result.ElementAt(i)[1]);
                    string msg     = result.ElementAt(i)[0];
                    Assert.IsTrue(textmatch, msg);
                }
            }
                            );
        }
Esempio n. 15
0
        public void TC_VerifyFooter()
        {
            SeleniumKeywords.RefreshPage();
            System.Threading.Thread.Sleep(3000);

            //Common dblink = new Common();
            cmn.ClickFooterDashboardLink();
            Page_HAPrompt haprompt = new Page_HAPrompt();

            haprompt.GoToDashboard();
            Page_Dashboard dashbrd = new Page_Dashboard();

            Assert.IsTrue(dashbrd.JourneyBannerDisplayed(), "Journey Banner missing");
            Footer ftr = new Footer();

            ftr.TC_VerifyTrackerLink();
            ftr.TC_VerifyMyHealthLink();
            if ((!clientname.Equals("arc")) || (!clientname.Equals("self directed")))
            {
                //Assert.Ignore("Certificate is not available for " + clientname);
                Common hipaa = new Common();
                hipaa.ClickFooterHipaaLink();
                Page_HIPAA      rights = new Page_HIPAA();
                List <string[]> result = rights.VerifyHeader();
                Assert.Multiple(() =>
                {
                    for (int i = 0; i < result.Count; i++)
                    {
                        Assert.IsTrue(Convert.ToBoolean(result.ElementAt(i)[1]), result.ElementAt(i)[0]);
                    }
                }
                                );
                Assert.IsTrue(rights.VerifyContentSectionPresent(), "HIPAA Rights content not found");
            }
            ftr.TC_VerifyPrivacyPolLink();
            ftr.TC_VerifyTOSLink();
            ftr.TC_VerifyCertificateLnk();
            ftr.TC_VerifyFeedbackLink();
        }
        public void TC_VerifySentMsgToCoach()
        {
            List <string[]> isEnabled = cmn.GetConfig("CoachingEnabled", "IncentiveEnabled");

            incentiveEnabled = isEnabled.ElementAt(0)[2].ToLower();
            coachingEnabled  = isEnabled.ElementAt(0)[1].ToLower();
            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();
            //Common pcommon = new Pages.Common();
            //pcommon.GoToMessageToCoachPage();
            expmsg = "Hi Coach this is me";
            //this call send and verify the send message to coach
            Page_MessageToCoach pmsgcoach = new Page_MessageToCoach();
            String actmesg = pmsgcoach.VerifyMsgToCoach(expmsg);

            SeleniumKeywords.RefreshPage();

            //Console.WriteLine(expmsg.ElementAt(0)[0]);
            Assert.AreEqual(expmsg, actmesg);
        }
Esempio n. 17
0
        /// <summary>
        /// 1. Enters Data in the specified locators
        /// 2. Verifies History Header
        /// 3. Verifies first 3 values of Tracker in history
        /// </summary>
        /// <returns></returns>
        private void InputAndUpdateTrackerData()
        {
            List <string[]> result      = new List <string[]>();
            List <string[]> trackerdata = CSVReaderDataTable.GetCSVData("InputDataContent", pageName, "stressdata");
            List <string[]> historydata = CSVReaderDataTable.GetCSVData("CommonContent", pageName, "trackerhistoryheader");
            Common          date        = new Common(softAssertions);
            CommonTracker   stress      = new CommonTracker(softAssertions);

            //date.VerifyTimeAndDate();

            int changevalueindex = 0;


            for (int i = 0; i < 3; i++)
            {
                SeleniumKeywords.RefreshPage();
                int widthmultiple = 1;
                switch (trackerdata.ElementAt(i)[4])
                {
                case "Barely any or none":
                    widthmultiple = 0;
                    break;

                case "A little bit":
                    widthmultiple = 1;
                    break;

                case "Some":
                    widthmultiple = 2;
                    break;

                case "Quite a bit":
                    widthmultiple = 3;
                    break;

                case "A lot":
                    widthmultiple = 4;
                    break;
                }
                System.Threading.Thread.Sleep(10000);
                SeleniumKeywords.MoveAndClickAtSpecificPosition(pageName, trackerdata.ElementAt(i)[3], 4, widthmultiple, 1, 1);
                System.Threading.Thread.Sleep(3000);
                string inputdatetime = date.GetTrackerDateTime()[i];
                Console.WriteLine("InputDateTime : " + inputdatetime);
                JavaScriptKeywords.SetTextByControlId("DataPointDate", inputdatetime);
                stress.ClickUpdateButton();
                //System.Threading.Thread.Sleep(3000);
                stress.ClickViewHistory();
                if (i == 0)
                {
                    stress.ValidateHistoryHeader(historydata, pageName);
                    historydata = CSVReaderDataTable.GetCSVData("CommonContent", pageName, "trackerhistoryvalue");
                }

                String historytabledata = Convert.ToDateTime(inputdatetime).ToString("dddd, MMM dd yyyy hh:mm tt") + "|" + trackerdata.ElementAt(i)[4];

                //historydata.ElementAt(changevalueindex)[4] = Convert.ToDateTime(date.GetDate()[i]).ToString("dddd, MMM dd yyyy HH:mm tt");
                historydata.ElementAt(0)[4] = historytabledata;
                stress.ValidateHistoryData(historydata, pageName);
            }
        }
Esempio n. 18
0
 /// <summary>
 /// This method refresh the web page
 /// </summary>
 public void RefreshWebPage()
 {
     SeleniumKeywords.RefreshPage();
 }