OpenQA.Selenium.AlertsTest.ShouldAllowUsersToDismissAnAlertManually C# (CSharp) Method

ShouldAllowUsersToDismissAnAlertManually() private method

private ShouldAllowUsersToDismissAnAlertManually ( ) : void
return void
        public void ShouldAllowUsersToDismissAnAlertManually()
        {
            driver.Url = alertsPage;

            driver.FindElement(By.Id("alert")).Click();

            IAlert alert = driver.SwitchTo().Alert();
            alert.Dismiss();

            // If we can perform any action, we're good to go
            Assert.AreEqual("Testing Alerts", driver.Title);
        }