예제 #1
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);
                }
            }
                            );
        }
        public void TC_FillProgressCheckin()
        {
            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 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);
                }
            }
                            );
        }