Beispiel #1
0
 /// <summary>
 /// Submits the authentication request.
 /// </summary>
 public virtual void SubmitAuthentication()
 {
     // Press OK and wait for authentication to complete
     try
     {
         string label = ControlPanel.ActiveScreenLabel();
         if (label.Equals("view_authentication_ldap_login") || label.Equals("view_authentication_window_login"))
         {
             ControlPanel.Press("native_login_footer.0");
         }
     }
     catch (SiriusInvalidOperationException ex)
     {
         throw new DeviceWorkflowException($"Could not sign in: {ex.Message}", ex);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Enters the user name and password on the device control panel.
        /// </summary>
        private void EnterUserNamePassword()
        {
            string label;

            try
            {
                label = ControlPanel.ActiveScreenLabel();

                switch (label)
                {
                case "view_authentication_ldap_login":
                    //Enter Username
                    EnterText("ldap_login_username_edit", "view_ldap_login_username_touch", "ldap_ldap_login_username_keyboard.4", Credential.UserName);
                    Pacekeeper.Sync();
                    //Enter Password
                    EnterText("ldap_password_entry_password", "view_user_password_entry_password", "user_password_entry_password_keyboard.4", Credential.Password);
                    break;

                case "view_authentication_window_login":
                    //Enter Username
                    EnterText("windows_login_username_entry", "view_windows_login_username_entry_username", "ldap_windows_login_username_keyboard.4", Credential.UserName);
                    Pacekeeper.Sync();
                    //Enter Password
                    EnterText("windows_login_password_entry_password", "view_windows_password_entry_password", "windows_password_entry_password_keyboard.4", Credential.Password);
                    break;
                }
                Pacekeeper.Sync();
            }
            catch (ElementNotFoundException ex)
            {
                label = ControlPanel.ActiveScreenLabel();
                switch (label)
                {
                case "view_authentication_window_login":
                    throw new DeviceWorkflowException("Could not sign in using Windows authentication.", ex);

                case "view_oxpd_auth_result":
                    ControlPanel.Press("oxpd_auth_result_msg_footer.0");
                    throw new DeviceWorkflowException("Could not sign in using LDAP authentication.", ex);
                }
            }
        }