public void _02_GetCurrentFrameName()
 {
     test = extent
            .StartTest("GetCurrentFrameName ", "Searches for frame name " + "menu_page")
            .AssignCategory("Frames");
     try
     {
         Assert.True(FrameHandler.GetCurrentFrameName(_driver).Equals("menu_page"), "Frame name was not 'menu_page' ");
         test.Log(LogStatus.Pass, "The frame is titled " + "'menu_page'");
     }
     catch (Exception ex)
     {
         test.Log(LogStatus.Fail, "<pre>" + ex.StackTrace + "</pre>");
         throw;
     }
 }
 public void _03_GetDefaultContext()
 {
     test = extent
            .StartTest("GetDefaultContent", "Moves to Default Content")
            .AssignCategory("Frames");
     try
     {
         FrameHandler.MoveToDefaultContext(_driver);
         Assert.Null(FrameHandler.GetCurrentFrameName(_driver), "Failed to move to default Content ");
         test.Log(LogStatus.Pass, "Moved properly to default content");
     }
     catch (Exception ex)
     {
         test.Log(LogStatus.Fail, "<pre>" + ex.StackTrace + "</pre>");
         throw;
     }
 }
 public void _05_MoveToParentFrame()
 {
     test = extent
            .StartTest("MoveToParentFrame", "Moves to frame " + "'main_page'")
            .AssignCategory("Frames");
     try
     {
         FrameHandler.MoveToParentFrame(_driver);
         Assert.True(FrameHandler.GetCurrentFrameName(_driver).Equals("main_page"), "Frame name was not 'main_page' ");
         test.Log(LogStatus.Pass, "The current frame is " + "'main_page'");
     }
     catch (Exception ex)
     {
         test.Log(LogStatus.Fail, "<pre>" + ex.StackTrace + "</pre>");
         throw;
     }
 }
 public void _06_MoveToSiblingFrame()
 {
     test = extent
            .StartTest("MoveToSiblingFrame", " Moves to frame " + "'main_frame2'")
            .AssignCategory("Frames");
     test.Log(LogStatus.Info, "Final Test in 'FrameHandlerTest' series");
     try
     {
         FrameHandler.MoveToChildFrame(_driver, By.Name("main_frame1"));
         FrameHandler.MoveToSiblingFrame(_driver, By.Name("main_frame2"));
         Assert.True(FrameHandler.GetCurrentFrameName(_driver).Equals("main_frame2"), "Frame name was not 'main_frame2' ");
         test.Log(LogStatus.Pass, "The current frame is " + "'main_frame2'");
     }
     catch (Exception ex)
     {
         test.Log(LogStatus.Fail, "<pre>" + ex.StackTrace + "</pre>");
         throw;
     }
 }
        public void _04_MoveToChildFrameArray()
        {
            test = extent
                   .StartTest("MovedToChildFrameArray", "Moves into " + "'main_frame1'")
                   .AssignCategory("Frames");
            try
            {
                By locatorParentFrame = By.Name("main_page");
                By locatorChildFrame  = By.Name("main_frame1");

                FrameHandler.MoveToChildFrame(_driver, new By[] { locatorParentFrame, locatorChildFrame });
                Assert.True(FrameHandler.GetCurrentFrameName(_driver).Equals("main_frame1"), "Failed to move to 'main_frame1'  ");
                test.Log(LogStatus.Pass, "The current frame is " + "main_frame1");
            }
            catch (Exception ex)
            {
                test.Log(LogStatus.Fail, "<pre>" + ex.StackTrace + "</pre>");
                throw;
            }
        }