Exemplo n.º 1
0
        public void KidneyRAR()
        {
            //KidneyRARPage kr = new KidneyRARPage(new TestingBrowser(Browser.Chrome, BrowserWindowSize.DesktopNarrow_968x788));
            using (KidneyRARPage kr = new KidneyRARPage(new TestingBrowser(Browser.Chrome, BrowserWindowSize.Desktop_1300x2000)))
            {
                kr.GotoPage(TestingHelper.FullUrl(MCIQ_Constants.PageUrl_Kidney_RARAgreement));
                kr.CheckAgreement();
                kr.ClickStartNow();

                Assert.IsTrue(kr.IsAtPageTitle(MCIQ_Constants.PageTitle_Kidney_Cancer_Assessment), "Kidney RAR in wrong page");

                //verify there are 3 sections
                Assert.IsTrue(kr.Is3Sections());

                //set answers
                //section 1
                kr.Question_KdnyPersHist_Answer(YesNoUnknow.No);
                kr.Question_KdnySex_Answer(Gender.Male);
                kr.Question_kdnyAge_Answer(56);
                kr.Question_KdnyFamHist_Answer(YesNoUnknow.No);
                //kr.Question_KdnyHeight(ImperialOrMetric.Metric, "180 cm");
                kr.Question_KdnyHeight(ImperialOrMetric.Imperial, "6'", "1\"");
                kr.Question_KdnyWeight(200, WeightUnit.lb);

                //Assert.IsTrue(kr.IsNextButtonEnabled(), "section 1 next button not enable");
                //Assert.IsFalse(kr.IsPreviousButtonEnabled(), "section 1 previous button not disable");

                kr.ClickNext(false, "");

                //section 2
                Thread.Sleep(100);
                kr.Question_KdnyHT_Answer(YesNoUnknow.No);

                //Assert.IsTrue(kr.IsNextButtonEnabled(), "section 2 next button not enable");
                //Assert.IsTrue(kr.IsPreviousButtonEnabled(), "section 2 previous button not enable");

                kr.ClickNext(false, "");

                //section 3
                kr.Question_KdnySmoking_Answer(SmokingHistory.No);

                //Assert.IsTrue(kr.IsNextButtonEnabled(), "section 3 next button not enable");
                //Assert.IsTrue(kr.IsPreviousButtonEnabled(), "section 3 previous button not enable");

                kr.ClickGetResult();
                kr.TakeScreenshot("Kidney_RARTests_KidneyRAR");
                Assert.IsTrue(kr.IsAtRiskLevel("LOWER THAN AVERAGE"), "Risk level is not correct");

                // kr.ClickSavePDF();
                // Thread.Sleep(3000);
            }
        }