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

ShouldAllowUsersToAcceptAnAlertManually() private méthode

private ShouldAllowUsersToAcceptAnAlertManually ( ) : void
Résultat void
        public void ShouldAllowUsersToAcceptAnAlertManually()
        {
            driver.Url = alertsPage;

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

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

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