public void VerifyAnnouncementInAnnouncementLightBox(Announcement.
                                                             AnnouncementTypeEnum announcementTypeEnum)
        {
            //Verifying Display of Announcement in lightbox
            Logger.LogMethodEntry("CreateAnnouncement",
                                  "VerifyAnnouncementInAnnouncementLightBox",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Get announcement From Memory
            Announcement announcement = Announcement.Get(announcementTypeEnum);
            //Declaration Page Class Object
            AnnouncementDefaultUXPage announcementDefaultUxPage =
                new AnnouncementDefaultUXPage();

            //Select the frame
            announcementDefaultUxPage.SelectGlobalAnnouncementframe();
            //Assert for Announcement Display
            Logger.LogAssertion("VerifyAnnouncementDisplay", ScenarioContext.
                                Current.ScenarioInfo.Title, () => Assert.AreEqual(announcement.Name,
                                                                                  announcementDefaultUxPage.GetAnnouncementDetails(announcement.Name)));
            //Close the light box
            announcementDefaultUxPage.CloseAnnoucementLightBox();
            Logger.LogMethodExit("CreateAnnouncement",
                                 "VerifyAnnouncementInAnnouncementLightBox",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
示例#2
0
 /// <summary>
 /// Select Announcement
 /// </summary>
 /// <param name="announcementTypeEnum">This is announcement by type</param>
 public void SelectAnnouncement(Announcement.
                                AnnouncementTypeEnum announcementTypeEnum)
 {
     //Selecting  Announcement
     logger.LogMethodEntry("MyPegasusUXPage", "SelectAnnouncement"
                           , base.IsTakeScreenShotDuringEntryExit);
     try
     {
         //Select the window
         this.SelectGlobalHomePage();
         //Get announcement from memory
         Announcement announcement = Announcement.Get(announcementTypeEnum);
         base.WaitForElement(By.PartialLinkText(announcement.Name));
         //Focus on Element
         base.FocusOnElementByPartialLinkText(announcement.Name);
         //Click on Announcement link
         IWebElement getAnnouncement = base.GetWebElementPropertiesByPartialLinkText
                                           (announcement.Name);
         base.ClickByJavaScriptExecutor(getAnnouncement);
     }
     catch (Exception e)
     {
         ExceptionHandler.HandleException(e);
     }
     logger.LogMethodExit("MyPegasusUXPage", "SelectAnnouncement",
                          base.IsTakeScreenShotDuringEntryExit);
 }
示例#3
0
        public void VerifyDisplayOfAnnouncement(
            Announcement.AnnouncementTypeEnum
            announcementTypeEnum)
        {
            //Verify Display Of Announcement
            Logger.LogMethodEntry("ManageAnnouncement",
                                  "VerifyDisplayOfAnnouncement",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Verify Announcement Display
            new CreateAnnouncementUXPage().SelectAnnouncmentFrame();
            //Get Announcement Details from Memory
            Announcement announcement = Announcement.Get(announcementTypeEnum);

            //Assert for Announcement Display
            Logger.LogAssertion("VerifyDisplayOfAnnouncement",
                                ScenarioContext.Current.ScenarioInfo.Title, () =>
                                Assert.AreEqual(announcement.Name,
                                                new AnnouncementDefaultUXPage().
                                                GetAnnouncementDetails(announcement.Name)));
            // Close Annoucement LightBox
            new AnnouncementDefaultUXPage().CloseAnnoucementLightBox();
            Logger.LogMethodExit("ManageAnnouncement", "VerifyDisplayOfAnnouncement",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
示例#4
0
 public Announcement GetAnnouncement(NSIndexPath indexPath)
 {
     return(announcements[indexPath.Row] ?? (announcements[indexPath.Row] = Announcement.Get(course.Id, course.AnnouncementIds[indexPath.Row])));
 }