Example #1
0
 public void InitElements()
 {
     Dashboard      = new WebElementWrapper(ByDashboard);
     Benchmark      = new WebElementWrapper(ByBenchmark);
     ReportBank     = new WebElementWrapper(ByReportBank);
     SchoolDistrict = new WebElementWrapper(BySchoolDistrict);
     //hover over the assess admin menu
     SchoolDistrict.MoveToElement();
 }
Example #2
0
 /// <summary>
 /// initialize elements
 /// </summary>
 public void InitElements()
 {
     Dashboard       = new WebElementWrapper(ByDashboard);
     Create          = new WebElementWrapper(ByCreate);
     FindTest        = new WebElementWrapper(ByFindTest);
     TestWindows     = new WebElementWrapper(ByTestWindows);
     AssessmentAdmin = new WebElementWrapper(ByAssessmentAdmin);
     //hover over the assess admin menu
     if (this.TestConfiguration.BrowserName != BrowserType.SAFARI)
     {
         AssessmentAdmin.MoveToElement();
     }
 }
Example #3
0
        /// <summary>
        /// focus on main content area, to stop hover over menu
        /// </summary>
        public void FocusOnMainContentArea()
        {
            try
            {
                Point dummyPoint = new Point(0, 0);
                Point point;

                GlobalAppHeader = new WebElementWrapper(ByGlobalAppHeader);
                GlobalNav       = new WebElementWrapper(ByGlobalNav);
                MainContentArea = new WebElementWrapper(ByMainContentArea);
                AppTitle        = new WebElementWrapper(ByAppTitle);

                //new DriverCommands(Driver).GetScreenshotAndPageSource();
                //move to the header
                GlobalAppHeader.Wait(3);
                GlobalAppHeader.LocationOnScreenOnceScrolledIntoView = dummyPoint;
                point = GlobalAppHeader.LocationOnScreenOnceScrolledIntoView;
                GlobalAppHeader.Location = dummyPoint;
                point = GlobalAppHeader.Location;
                if (this.TestConfiguration.BrowserName != BrowserType.SAFARI)
                {
                    GlobalAppHeader.MoveToElement();
                }

                //new DriverCommands(Driver).GetScreenshotAndPageSource();
                //move to the global nav
                GlobalNav.Wait(3);
                GlobalNav.LocationOnScreenOnceScrolledIntoView = dummyPoint;
                point = GlobalNav.LocationOnScreenOnceScrolledIntoView;
                GlobalNav.Location = dummyPoint;
                point = GlobalNav.Location;
                if (this.TestConfiguration.BrowserName != BrowserType.SAFARI)
                {
                    GlobalNav.MoveToElement();
                }

                //new DriverCommands(Driver).GetScreenshotAndPageSource();
                //move to the main content area
                MainContentArea.Wait(3);
                MainContentArea.LocationOnScreenOnceScrolledIntoView = dummyPoint;
                point = MainContentArea.LocationOnScreenOnceScrolledIntoView;
                MainContentArea.Location = dummyPoint;
                point = MainContentArea.Location;
                if (this.TestConfiguration.BrowserName != BrowserType.SAFARI)
                {
                    MainContentArea.MoveToElement();
                }

                try
                {
                    AppTitle.Wait(3);
                    if (this.TestConfiguration.BrowserName != BrowserType.SAFARI)
                    {
                        AppTitle.MoveToElement();
                    }
                    AppTitle.Click();
                }
                catch (Exception ex)
                {
                    //new DriverCommands(Driver).GetScreenshotAndPageSource();
                    //click on main content area
                    MainContentArea.Click();
                }
            }
            catch (Exception e)
            {
                throw new Exception("\nInnerException:\n" + e.InnerException + "\nStackTrace:\n" + e.StackTrace, e);
            }
        }