コード例 #1
0
 internal static void VerifyOBRAassessmentType()
 {
     try
     {
         // Admission
         if (Driver.IsElementPresent(admissionAssessment))
         {
             VerifyElement.IsPresent(admissionAssessment);
         }
         else
         {
             Driver.ClickOn(SchedulePage.nextPagination);
             VerifyElement.IsPresent(admissionAssessment);
             Driver.ClickOn(SchedulePage.previousPagination);
         }
         // Quarterly
         if (Driver.IsElementPresent(quarterlyAssessment))
         {
             VerifyElement.IsPresent(quarterlyAssessment);
         }
         else
         {
             Driver.ClickOn(SchedulePage.nextPagination);
             VerifyElement.IsPresent(quarterlyAssessment);
             Driver.ClickOn(SchedulePage.previousPagination);
         }
         VerifyElement.IsNotPresent(SchedulePage.fivedayAssessment);
         VerifyElement.IsNotPresent(SchedulePage.fourteendayAssessment);
         VerifyElement.IsNotPresent(SchedulePage.thirtydayAssessment);
         VerifyElement.IsNotPresent(SchedulePage.sixtydayAssessment);
         VerifyElement.IsNotPresent(SchedulePage.ninetydayAssessment);
     }
     catch (Exception e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
 }
コード例 #2
0
 public void TC040_QualityMeasuresLongStayDetails_PageObjectVerificationPageTest()
 {
     Browser.Open();
     LoginPage.SignIn();
     //LandingPage.NavigateToReportsFormsPage();
     //DashboardPage.NavigateToQualityMeasures();
     //DashboardPage.NavigateToQualityMeasuresLongStayDetails();
     Driver.Instance.Navigate().GoToUrl("http://cariboudevweb.dssinc.com/CaribouCLCSuite/menu/dashboard/qualityindicatorslongterm");
     Driver.WaitFor(2);
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.XPath("//div[@id='navbar']/header/nav/div/ui-breadcrumbs/ol/li/a/i")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Caribou CLC Suite", Driver.Instance.FindElement(By.LinkText("Caribou CLC Suite")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Reports & Forms", Driver.Instance.FindElement(By.LinkText("Reports & Forms")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Quality Indicators & Measures - Long Term", Driver.Instance.FindElement(By.CssSelector("li.ng-scope.active > span.ng-binding")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.XPath("//div[@id='navbar']/header/nav/div[2]/div/div/i")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.XPath("//div[@id='navbar']/header/nav/div[2]/div/div[3]/i")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.CssSelector("img.img-circle.user-image")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Quality Measures Long Stay Details", Driver.Instance.FindElement(By.CssSelector("h1")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.XPath("//input[@type='text']")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.XPath("(//button[@type='button'])[2]")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.CssSelector("button.btn.btn-default")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.XPath("//section[@id='main-content']/div/div/div/div/div/div/div/div[3]/button")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("MDS 3.0 Facility Level Quality Measure Report - Resident Detail (Long Stay)", Driver.Instance.FindElement(By.CssSelector("h2.text-center")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Facility ID:", Driver.Instance.FindElement(By.CssSelector("td.ng-binding")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Report Period:", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr/th/table/tbody/tr/td[2]")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Facility Name:", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr/th/table/tbody/tr[2]/td")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Run Date:", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr/th/table/tbody/tr[2]/td[2]")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("City/State:", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr/th/table/tbody/tr[3]/td")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Resident Name", Driver.Instance.FindElement(By.CssSelector("th > div > span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("A0310A/B/F", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[2]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("One or More Falls with Major Injury N013.01(L)", Driver.Instance.FindElement(By.CssSelector("th.vertical > div > span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Moderate to Severe Pain N014.02(L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[4]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("High-Risk With Pressure Ulcers N015.01 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[5]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Assessed/Appropriately Given FluVacc N016.02 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[6]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Received FluVacc N017.02(L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[7]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Offered and Declined FluVacc N018.02 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[8]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Did Not Receive FluVacc, Contraindicated N019.02 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[9]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Assessed/Appropriately Given PneumoVacc N020.01 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[10]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Received the PneumoVacc N021.01 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[11]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Offered and Declined PneumoVacc N022.01 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[12]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Didn’t Receive PneumoVac, Contraindicated N023.01 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[13]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Urinary Tract Infection N024.01 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[14]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Have/Had Cath Inserted + Left in Bladder N026.02(L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[15]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Physically Restrained N027.01 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[16]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Need for ADL help Increased N028.01 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[17]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Lose Too Much Weight N029.01(L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[18]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Received Antipsychotic Medication N031.02(L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[19]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Prevalence of Falls N032.01 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[20]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Prevalence of Antianxiety/Hypnotic Use N033.01 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[21]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Prevalence of Behavior SX Affect Others N034.01 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[22]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Declined in Independence in Locomotion N035.01 (L)", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[23]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Quality Measure Count", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[2]/th[24]/div/span")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Data", Driver.Instance.FindElement(By.XPath("//table[@id='divToPrint']/thead/tr[3]/th")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Caribou CLC Suite", Driver.Instance.FindElement(By.CssSelector("span.pull-left.ng-binding")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("v2.1.49", Driver.Instance.FindElement(By.XPath("//footer[@id='footer']/span[2]")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Selenium, Facility", Driver.Instance.FindElement(By.XPath("//footer[@id='footer']/span[3]")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Developed by DSS, Inc. © 2016", Driver.Instance.FindElement(By.CssSelector("span.pull-right")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
 }
コード例 #3
0
 public void TC028_FacilityDiscipline_PageObjectVerificationPageTest()
 {
     Browser.Open();
     LoginPage.SignIn();
     LandingPage.NavigateToAdminPage();
     AdminPage.NavigateToUsersRoles();
     Driver.WaitFor(2);
     Driver.ClickOn(UsersRolesPage.addDisciplineButton);
     Driver.WaitFor(2);
     try
     {
         Assert.AreEqual("Facility Discipline", Driver.Instance.FindElement(By.CssSelector("h3.modal-title")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Discipline Name", Driver.Instance.FindElement(By.CssSelector("label.control-label")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.Id("DisciplineName")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Description", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[2]/label")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.Id("Description")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.XPath("//body[@id='mds']/div/div/div/div[3]/div/div[2]/button")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.CssSelector("button.btn.btn-primary")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Caribou CLC Suite", Driver.Instance.FindElement(By.CssSelector("span.pull-left.ng-binding")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         VerifyElement.IsPresent(By.XPath("//footer[@id='footer']/span[2]"));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Selenium, Facility", Driver.Instance.FindElement(By.XPath("//footer[@id='footer']/span[3]")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Developed by DSS, Inc. © 2016", Driver.Instance.FindElement(By.XPath("//*[@id='footer']/span[4]")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
 }
コード例 #4
0
 public void TC029_FacilityRole_PageObjectVerificationPageTest()
 {
     Browser.Open();
     LoginPage.SignIn();
     LandingPage.NavigateToAdminPage();
     AdminPage.NavigateToUsersRoles();
     Driver.WaitFor(2);
     Driver.ClickOn(UsersRolesPage.addRoleButton);
     Driver.WaitFor(1);
     try
     {
         Assert.AreEqual("Facility Role", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div/h3")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Role Name", Driver.Instance.FindElement(By.XPath("//*[@id='mds']/div[1]/div/div/div[2]/div/div[1]/form/div[1]/label")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.Id("roleName")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Checked means Read/Write, unchecked means Read-Only", Driver.Instance.FindElement(By.XPath("//*[@id='mds']/div[1]/div/div/div[2]/div/div[2]/small")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Description", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[2]/label")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.IsTrue(Driver.IsElementPresent(By.Id("description")));
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Permissions", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[3]/label")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Read Users, Roles, Disciplines", Driver.Instance.FindElement(By.XPath("//*[@id='mds']/div[1]/div/div/div[2]/div/div[1]/form/div[3]/ul/li[1]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Write Users, Roles, Disciplines", Driver.Instance.FindElement(By.XPath("//li[2]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Read Assessments", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[3]/ul/li[3]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Write Assessments", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[3]/ul/li[4]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Manage Assessments", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[3]/ul/li[5]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Read Residents", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[3]/ul/li[6]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Write Residents (Sync)", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[3]/ul/li[7]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Write Schedule", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[3]/ul/li[9]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Read Batches", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[3]/ul/li[10]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Write Batches", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[3]/ul/li[11]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Read Reports", Driver.Instance.FindElement(By.XPath("//*[@id='mds']/div[1]/div/div/div[2]/div/div[1]/form/div[3]/ul/li[12]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Write Reports", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[3]/ul/li[13]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Read Settings", Driver.Instance.FindElement(By.XPath("//*[@id='mds']/div[1]/div/div/div[2]/div/div[1]/form/div[3]/ul/li[14]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Write Settings", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[3]/ul/li[15]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Account Settings", Driver.Instance.FindElement(By.XPath("//*[@id='mds']/div[1]/div/div/div[2]/div/div[1]/form/div[3]/ul/li[16]/div/label/span/strong")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("Sections Permissions", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[2]/div/div/form/div[4]/label")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("CANCEL", Driver.Instance.FindElement(By.XPath("//body[@id='mds']/div/div/div/div[3]/div/div[2]/button")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
     try
     {
         Assert.AreEqual("SAVE", Driver.Instance.FindElement(By.XPath("//*[@id='mds']/div[1]/div/div/div[3]/div[1]/div[2]/button[2]")).Text);
     }
     catch (AssertionException e)
     {
         VerifyElement.ExceptionLog(e.Message);
     }
 }
コード例 #5
0
        public void TC026_CMS802_RosterSampleMatrixPageTest()
        {
            Browser.Open();
            LoginPage.SignIn();
            LandingPage.NavigateToReportsFormsPage();
            Driver.WaitFor(2);
            DashboardPage.NavigateToCMS802();
            Driver.WaitFor(2);
            VerifyElement.IsPresent(CMS802Page.homeIcon);
            VerifyElement.IsPresent(CMS802Page.caribouCLSSuiteNavbar);
            VerifyElement.IsPresent(CMS802Page.reportsFormsNavbar);
            VerifyElement.IsPresent(CMS802Page.cms802Navbar);
            VerifyElement.IsPresent(CMS802Page.notificationBellIcon);
            VerifyElement.IsPresent(CMS802Page.syncStatusIcon);
            VerifyElement.IsPresent(CMS802Page.profileIcon);
            VerifyElement.AreEqual(CMS802Page.pageHeader, "CMS-802 Roster/Sample Matrix");
            VerifyElement.IsPresent(CMS802Page.printButton);
            VerifyElement.IsPresent(CMS802Page.instructionsButton);
            VerifyElement.IsPresent(CMS802Page.addRowButton);
            VerifyElement.IsPresent(CMS802Page.saveButton);
            VerifyElement.IsPresent(CMS802Page.selectExistingButton);
            VerifyElement.IsPresent(CMS802Page.createNewButton);
            Driver.ClickOn(CMS802Page.createNewButton);
            Driver.WaitFor(2);
            VerifyElement.AreEqual(CMS802Page.neighborhoodsHeader, "Neighborhoods");
            VerifyElement.AreEqual(CMS802Page.selectNeighborhoodLabel, "Select Neighborhood");
            VerifyElement.IsPresent(CMS802Page.selectNeighborhoodDropdown);
            VerifyElement.IsPresent(CMS802Page.cancelButton);
            VerifyElement.IsPresent(CMS802Page.confrimButton);
            Driver.ClickOn(CMS802Page.cancelButton);
            VerifyElement.AreEqual(CMS802Page.informationMessage, "All information entered by computer should be verified by a staff member knowledgeable about the resident population.");
            try
            {
                Assert.AreEqual("Resident Number", Driver.Instance.FindElement(By.CssSelector("#header1 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Resident Room", Driver.Instance.FindElement(By.CssSelector("#header2 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Surveyor Assigned", Driver.Instance.FindElement(By.CssSelector("#header3 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Total Sample", Driver.Instance.FindElement(By.XPath("//div[@id='divToPrint']/div/div/table/thead/tr/th[4]/div/span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Phase 1", Driver.Instance.FindElement(By.XPath("//div[@id='divToPrint']/div/div/table/thead/tr/th[4]/div[2]/span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Phase 2", Driver.Instance.FindElement(By.XPath("//div[@id='divToPrint']/div/div/table/thead/tr/th[4]/div[3]/span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Individual Interview (I)", Driver.Instance.FindElement(By.XPath("//div[@id='divToPrint']/div/div/table/thead/tr/th[4]/div[4]/span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Family Interview (F)", Driver.Instance.FindElement(By.XPath("//div[@id='divToPrint']/div/div/table/thead/tr/th[4]/div[5]/span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Closed Record (CL)", Driver.Instance.FindElement(By.XPath("//div[@id='divToPrint']/div/div/table/thead/tr/th[4]/div[6]/span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Comprehensive (C)", Driver.Instance.FindElement(By.XPath("//div[@id='divToPrint']/div/div/table/thead/tr/th[4]/div[7]/span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Focused Review (FO)", Driver.Instance.FindElement(By.XPath("//div[@id='divToPrint']/div/div/table/thead/tr/th[4]/div[8]/span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("ARD", Driver.Instance.FindElement(By.CssSelector("#header5 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Interview: Individual/Family", Driver.Instance.FindElement(By.CssSelector("#header6 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Closed Record/Comprehensive/Focused", Driver.Instance.FindElement(By.CssSelector("#header7 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Privacy/Dignity Issues", Driver.Instance.FindElement(By.CssSelector("#header8 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Social Services", Driver.Instance.FindElement(By.CssSelector("#header9 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Self-Determination/Accommodation of Needs", Driver.Instance.FindElement(By.CssSelector("#header10 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Abuse/Neglect", Driver.Instance.FindElement(By.CssSelector("#header11 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Clean/Comfort/Homelike", Driver.Instance.FindElement(By.CssSelector("#header12 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Moderate/Severe Pain (Constant or Frequent)", Driver.Instance.FindElement(By.CssSelector("label > strong")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Hi-Risk Pressure Ulcer (Stage 2-4)", Driver.Instance.FindElement(By.CssSelector("#header14 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("New/Worsened Pressure Ulcers (Stage 2-4)", Driver.Instance.FindElement(By.CssSelector("#header15 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Physical Restraints", Driver.Instance.FindElement(By.CssSelector("#header16 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Falls including Falls with Major Injury", Driver.Instance.FindElement(By.CssSelector("#header17 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Psychoactive Meds with Absence of Condition", Driver.Instance.FindElement(By.CssSelector("#header18 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Antianxiety/Hypnotic Medication Use", Driver.Instance.FindElement(By.CssSelector("#header19 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Behavior Symptoms Affecting Others/Self", Driver.Instance.FindElement(By.CssSelector("#header20 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Depressive Symptoms", Driver.Instance.FindElement(By.CssSelector("#header21 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Urinary Tract Infection", Driver.Instance.FindElement(By.CssSelector("#header22 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Indwelling Urinary Catheter", Driver.Instance.FindElement(By.CssSelector("#header23 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Lo-Risk Resident Lose Bowel/Bladder Control", Driver.Instance.FindElement(By.CssSelector("#header24 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Excessive Weight Loss/Gain", Driver.Instance.FindElement(By.CssSelector("#header25 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Need for Increased ADL Help", Driver.Instance.FindElement(By.CssSelector("#header26 > div > label")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Hospice", Driver.Instance.FindElement(By.CssSelector("#header27 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Dialysis", Driver.Instance.FindElement(By.CssSelector("#header28 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Admittance/Transfer/Discharge", Driver.Instance.FindElement(By.CssSelector("#header29 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("MI (Non-Dementia) or ID/DD", Driver.Instance.FindElement(By.CssSelector("#header30 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Language/Communication", Driver.Instance.FindElement(By.CssSelector("#header31 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Vision/Hearing/Other Assistive Devices", Driver.Instance.FindElement(By.CssSelector("#header32 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("ROM/Contractures/Positioning", Driver.Instance.FindElement(By.CssSelector("#header33 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Specialty Care (Tubefeeding, Central Lines, Ventilators, O2)", Driver.Instance.FindElement(By.CssSelector("#header34 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Hydration/Swallowing/Oral Health", Driver.Instance.FindElement(By.CssSelector("#header35 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Infections", Driver.Instance.FindElement(By.CssSelector("#header36 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Specialized Rehab Services (OT, PT, Speech, etc)", Driver.Instance.FindElement(By.CssSelector("#header37 > div > span")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Resident Name", Driver.Instance.FindElement(By.Id("header4")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("(No Current Report)", Driver.Instance.FindElement(By.XPath("//div[@id='divToPrint']/div/div/table/tbody/tr/td")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }

            try
            {
                Assert.AreEqual("Caribou CLC Suite", Driver.Instance.FindElement(By.CssSelector("span.pull-left.ng-binding")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                VerifyElement.IsPresent(By.XPath("//footer[@id='footer']/span[2]"));
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Selenium, Facility", Driver.Instance.FindElement(By.XPath("//footer[@id='footer']/span[3]")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
            try
            {
                Assert.AreEqual("Developed by DSS, Inc. © 2016", Driver.Instance.FindElement(By.CssSelector("span.pull-right")).Text);
            }
            catch (AssertionException e)
            {
                VerifyElement.ExceptionLog(e.Message);
            }
        }