/// <summary>
 /// initialize elements
 /// </summary>
 public override void InitElements()
 {
     Grid = new EditTeacherAssignmentGrid(assignToSectionsGrid, true, ControlPrefix);
     AssignToSectionsRadio           = new WebElementWrapper(ByAssignToSectionsRadio);
     AssignToIndividualStudentsRadio = new WebElementWrapper(ByAssignToIndividualStudentsRadio);
     SectionCheck = new WebElementWrapper(BySectionCheck);
     StudentCheck = new WebElementWrapper(ByStudentCheck);
 }
        /// <summary>
        /// select assign to individual students
        /// </summary>
        public void SelectAssignToIndividualStudents()
        {
            AssignToIndividualStudentsRadio.Wait(3);
            AssignToIndividualStudentsRadio.Selected = true;
            if (AssignToIndividualStudentsRadio.Selected == false)
            {
                this.Parent.CurrentWindowHandle = Driver.CurrentWindowHandle;
                Report.Write("The current window is: '" + this.Parent.CurrentWindowHandle + "'.");

                AssignToIndividualStudentsRadio.Wait(3).Click();

                AlertHandler alert = new AlertHandler();
                alert.VerifyText("You will lose your selection if you change to a different assignment method?");
                alert.Accept();

                //switch to window
                DriverCommands.WaitToSwitchWindow(this.Parent.CurrentWindowHandle, 5);

                DriverCommands.WaitAndMeasurePageLoadTime();
                this.Parent.InitElements();
                Grid = new EditTeacherAssignmentGrid(assignToIndividualStudentsGrid, true, ControlPrefix);
            }
        }