コード例 #1
0
        public void DismissAlertSuccessfully_When_ClickCancelButton()
        {
            _alerts.ScrollTo(_alerts.AlertsSection).Click();
            _alerts.ConfirmButton.Click();

            var alert = Driver.WrappedDriver.SwitchTo().Alert();

            alert.Dismiss();

            _alerts.AssertTextDisplayed(_alerts.CanceledText);
            string message = "You selected Cancel";

            _alerts.AssertCorrectText(message, _alerts.CanceledText);
        }