예제 #1
0
        public void AcceptDismissAlert(UserActionType acceptance)
        {
            switch (acceptance)
            {
            case UserActionType.ACCEPT:
                AlertBoxUtils.AlertBoxHandler(_driver, true);
                break;

            case UserActionType.DISMISS:
                AlertBoxUtils.AlertBoxHandler(_driver, false);
                break;
            }
        }
예제 #2
0
        public void TypeAcceptDismissAlert(string text, UserActionType acceptance)
        {
            AlertBoxUtils.WriteToAlertBox(_driver, text);
            switch (acceptance)
            {
            case UserActionType.ACCEPT:
                AlertBoxUtils.AlertBoxHandler(_driver, true);
                break;

            case UserActionType.DISMISS:
                AlertBoxUtils.AlertBoxHandler(_driver, false);
                break;
            }
        }
예제 #3
0
        public void IPerformActionOnConfirmationBox(UserActionType userAction)
        {
            switch (userAction)
            {
            case UserActionType.ACCEPT:
                AlertBoxUtils.AlertBoxHandler(_driver, true);
                break;

            case UserActionType.DISMISS:
            case UserActionType.CLOSE:
                AlertBoxUtils.AlertBoxHandler(_driver, false);
                break;

            default:
                throw new Exception("Unable to determine required action on Alert box");
            }
        }