Example #1
0
        public void Should_handle_alert_dialog_browser_agnostic2()
        {
            ExecuteTest(browser =>
            {
                // GIVEN
                browser.DialogWatcher.CloseUnhandledDialogs = false;

                var dialogHandler = new JSAlertDialogHandler2(browser, () => browser.Button(Find.ByValue("Show alert dialog")).Click());

                // WHEN
                dialogHandler.DoAction();

                // THEN
                Assert.That(dialogHandler.Message, Is.EqualTo("This is an alert!"));
            });
        }
        public void Should_handle_alert_dialog_browser_agnostic2()
        {
            ExecuteTest(browser =>
            {
                // GIVEN
                browser.DialogWatcher.CloseUnhandledDialogs = false;

                var dialogHandler = new JSAlertDialogHandler2(browser, () => browser.Button(Find.ByValue("Show alert dialog")).Click());

                // WHEN
                dialogHandler.DoAction();

                // THEN
                Assert.That(dialogHandler.Message, Is.EqualTo("This is an alert!"));
            });
        }