OpenQA.Selenium.AlertsTest.ShouldAllowUsersToDismissAnAlertManually C# (CSharp) Méthode

ShouldAllowUsersToDismissAnAlertManually() private méthode

private ShouldAllowUsersToDismissAnAlertManually ( ) : void
Résultat 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);
        }