Example #1
0
        /// <summary>
        /// click the delete link
        /// </summary>
        public void SelectDelete()
        {
            CurrentWindow = Driver.CurrentWindowHandle;
            Report.Write("The current window is: '" + CurrentWindow + "'.");

            DeleteLink.Wait(5).Click();
            IAlert alert    = Driver.SwitchTo().Alert();
            string expected = "Are you sure you want to delete this rubric?";

            if (Driver.WrappedDriver.GetType() == typeof(DummyDriver))
            {
                ((DummyIAlert)alert).Text = expected;
            }
            string actual = alert.Text;

            Report.Write("The alert text: '" + actual + "'.");
            Assert.IsTrue(actual.Contains(expected), "The delete confirmation pop-up does not contain the expected text: '" + expected + "'; actual text: '" + actual + "'.");
            alert.Accept();

            //switch to window
            DriverCommands.WaitToSwitchWindow(CurrentWindow, 5);
            DriverCommands.WaitAndMeasurePageLoadTime(90, 30);
        }
 /// <summary>
 /// select actions, then select delete
 /// </summary>
 public void SelectDelete()
 {
     SelectActions();
     DeleteLink.Wait(3).Click();
 }