예제 #1
0
        private string AuthenticateUserRCS(
            string cwsServiceRoot,
            string cwsServiceSuffix,
            string rcsAuthServiceURL,
            string username,
            string password)
        {
            string token = "";

            InitRCSAuthenticationService(rcsAuthServiceURL);

            //RCSAuthentication.OTAuthentication otAuthRCS = new RCSAuthentication.OTAuthentication();

            //token = fRCSAuthService.AuthenticateApplication(ref otAuthRCS, username, password);

            if (fAuthMode.Equals(AuthenticationMode.LegacyRCSAuthentication))
            {
                InitAuthenticationService(cwsServiceRoot, cwsServiceSuffix);

                // get the expiry date for the token
                OTCSAuthentication.OTAuthentication otAuthCS = new OTCSAuthentication.OTAuthentication();
                otAuthCS.AuthenticationToken = token;

                fAuthExpiration = fAuthService.GetSessionExpirationDate(ref otAuthCS);

                token = otAuthCS.AuthenticationToken;
            }

            return(token);
        }
예제 #2
0
        /// <summary>
        /// Sets up the scan job.
        /// </summary>
        /// <param name="device">The device.</param>
        protected override void SetupJob(IDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            UpdateStatus(string.Format("Setting up device at address {0} for user {1}", device.Address, ExecutionData.Credential.UserName));

            string entryButtonTitle = "My workflow (FutureSmart)";

            IAuthenticator auth = AuthenticatorFactory.Create(device, ExecutionData.Credential, AuthenticationProvider.Auto);

            auth.WorkflowLogger = WorkflowLogger;

            AuthenticationMode am = (_data.ApplicationAuthentication == false) ? AuthenticationMode.Eager : AuthenticationMode.Lazy;

            if (am.Equals(AuthenticationMode.Eager))
            {
                UpdateStatus("Authenticating by pressing the Sign In button first.");
            }
            else
            {
                UpdateStatus(string.Format("Authenticating by pressing the {0} button first.", entryButtonTitle));
            }

            _hpecApp = HpecFactory.Create(device);
            _hpecApp.WorkflowLogger = WorkflowLogger;

            _hpecApp.Launch(auth, am);
        }
        /// <summary>
        /// Launch the SafeQ solution.
        /// </summary>
        protected void Launch()
        {
            string   _JobTitle = "SafeQ Scan";
            DateTime startTime = DateTime.Now;
            Dictionary <string, object> parameters = new Dictionary <string, object>();
            AuthenticationMode          am         = (_activityData.SafeQAuthentication == false) ? AuthenticationMode.Eager : AuthenticationMode.Lazy;

            if (am.Equals(AuthenticationMode.Eager))
            {
                if (_activityData.AuthProvider == AuthenticationProvider.Card)
                {
                    UpdateStatus("Authenticating by swiping badge on card reader first.");
                }
                else
                {
                    UpdateStatus("Authenticating by pressing the Sign In button first.");
                }
            }
            else // AuthenticationMode.Lazy
            {
                UpdateStatus("Authenticating by pressing the SafeQScan Button first.");
            }
            _SafeQApp.ChangeAppName(_JobTitle);
            _SafeQApp.Launch(Authenticator, am, parameters);
        }
        /// <summary>
        /// Launches the Email application using the specified authenticator and authentication mode.
        /// </summary>
        /// <param name="authenticator">The authenticator.</param>
        /// <param name="authenticationMode">The authentication mode.</param>
        /// <exception cref="System.NotImplementedException"></exception>
        public void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
        {
            if (authenticationMode.Equals(AuthenticationMode.Lazy))
            {
                try
                {
                    _controlPanel.Press("cScanHomeTouchButton");

                    if (_controlPanel.WaitForDisplayedText("Scan Menu", TimeSpan.FromSeconds(1)))
                    {
                        _controlPanel.Press("cEmailUiEmailDocument");
                    }

                    Pacekeeper.Pause();

                    if (_controlPanel.WaitForDisplayedText("Scan to E-mail", TimeSpan.FromSeconds(1)))
                    {
                        _controlPanel.Press("cSendAnEmail");
                    }
                    Thread.Sleep(TimeSpan.FromSeconds(2));
                    authenticator.Authenticate();
                    _controlPanel.WaitForDisplayedText("unknown", TimeSpan.FromSeconds(30));
                }
                catch (PhoenixInvalidOperationException ex)
                {
                    throw new DeviceWorkflowException($"Could not launch Email application: {ex.Message}", ex);
                }
            }
            else  // AuthenticationMode.Eager
            {
                throw new NotImplementedException("Eager Authentication has not been implemented in PhoenixMagicFrameEmailApp.");
            }
        }
예제 #5
0
        /// <summary>
        /// Launches the Email application using the specified authenticator and authentication mode.
        /// </summary>
        /// <param name="authenticator">The authenticator.</param>
        /// <param name="authenticationMode">The authentication mode.</param>
        public void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
        {
            if (authenticationMode.Equals(AuthenticationMode.Lazy))
            {
                try
                {
                    _executionManager.PressApplicationButton("cScanHomeTouchButton");
                    _executionManager.PressSolutionButton("Scan Menu", "cEmailUiEmailDocument");

                    // workflow changes depending on firmware -- need to be on the From: page...
                    var data = _controlPanel.GetDisplayedStrings();
                    if (data.Contains("Scan to E-mail"))
                    {
                        _executionManager.PressSolutionButton("Scan to E-mail", "cSendAnEmail");
                    }
                }
                catch (PhoenixInvalidOperationException ex)
                {
                    throw new DeviceWorkflowException($"Could not launch Email application: {ex.Message}", ex);
                }
            }
            else // AuthenticationMode.Eager
            {
                throw new NotImplementedException("Eager Authentication has not been implemented in PhoenixNovaEmailApp.");
            }
        }
        /// <summary>
        /// Launches Equitrac with the specified authenticator using the given authentication mode
        /// </summary>
        /// <param name="authenticator">The authenticator.</param>
        /// <param name="authenticationMode">The authentication mode, eager or lazy.</param>
        /// <exception cref="System.NotImplementedException"></exception>
        public override void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
        {
            bool communicateSuccess = false;

            if (authenticationMode.Equals(AuthenticationMode.Eager))
            {
                if (authenticator.Provider != AuthenticationProvider.Card)
                {
                    RecordEvent(DeviceWorkflowMarker.DeviceButtonPress, "Sign In");
                    _controlPanel.PressWait(JediWindjammerLaunchHelper.SIGNIN_BUTTON, JediWindjammerLaunchHelper.SIGNIN_FORM);
                }
                Authenticate(authenticator, JediWindjammerLaunchHelper.HOMESCREEN_FORM);

                RecordEvent(DeviceWorkflowMarker.AppButtonPress, "Equitrac " + SolutionButtonTitle);
                communicateSuccess = _controlPanel.ScrollPressWait("mAccessPointDisplay", "Title", SolutionButtonTitle, JediWindjammerLaunchHelper.OxpdFormIdentifier, StringMatch.Contains, TimeSpan.FromSeconds(50));
            }
            else // AuthenticationMode.Lazy
            {
                RecordEvent(DeviceWorkflowMarker.AppButtonPress, "Equitrac " + SolutionButtonTitle);
                if (_controlPanel.ScrollPressWait("mAccessPointDisplay", "Title", SolutionButtonTitle, JediWindjammerLaunchHelper.SIGNIN_FORM, TimeSpan.FromSeconds(50)) == true)
                {
                    communicateSuccess = Authenticate(authenticator, JediWindjammerLaunchHelper.OxpdFormIdentifier);
                }
            }

            if (!communicateSuccess)
            {
                throw new DeviceCommunicationException("Unable to communicate with the Equitrac server within 50 seconds.");
            }
        }
        /// <summary>
        /// Launches the specified authenticator with the desired authentication mode.
        /// </summary>
        /// <param name="authenticator">The authenticator.</param>
        /// <param name="authenticationMode">The authentication mode.</param>
        public override void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
        {
            if (authenticationMode.Equals(AuthenticationMode.Eager))
            {
                PressSignInButton();
                Authenticate(authenticator, JediOmniLaunchHelper.SignInOrSignoutButton);
                OnHomeScreen = IsAuthenticated;
            }
            else // AuthenticationMode.Lazy
            {
                switch (_initMethod)
                {
                case InitiationMethod.Badge:
                    Authenticate(authenticator, JediOmniLaunchHelper.SignInOrSignoutButton);
                    break;

                case InitiationMethod.Equitrac:
                case InitiationMethod.HPAC:
                case InitiationMethod.SafeCom:
                    PressSolutionButton();
                    Authenticate(authenticator, JediOmniLaunchHelper.LazySuccessScreen);
                    OnHomeScreen      = false;
                    IsAuthenticated   = true;
                    IsUnAuthenticated = false;
                    break;

                default:
                    throw new ControlNotFoundException("The '" + _solutionButton + "' is not defined for use by the Authentication plugin at this time.");
                }
            }
        }
예제 #8
0
        /// <summary>
        /// Perform the authentication
        /// </summary>
        /// <param name="force">If true request for a new token</param>
        /// <returns>If authentication succeed</returns>
        private bool Authenticate(bool force = false)
        {
            var certificationIsValid = true;

            if (this.x509Certificate == null)
            {
                certificationIsValid = authenticationMode.Equals(AuthenticationMode.CertificateModule) ? CertificationManager.GetCertificate(CertificateModuleName, out x509Certificate) : CertificationManager.GetCertificate(CertificateTitle, CertificateThumbprint, out x509Certificate);
            }

            if (certificationIsValid)
            {
                if (this.AuthToken == string.Empty || force)
                {
                    if (!TokenManager.GetToken(x509Certificate, TokenValidity, out this.AuthToken))
                    {
                        //Logger.WriteLog(Logger.PLMLogEvent.Error, "Cannot retrieve the authentication token");
                        return(false);
                    }
                }
            }
            else
            {
                //Logger.WriteLog(Logger.PLMLogEvent.Error, "Not found a valid certificate");
                return(false);
            }

            return(true);
        }
예제 #9
0
        public override void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
        {
            if (authenticationMode.Equals(AuthenticationMode.Lazy))
            {
                EmailToAddress = authenticator.Credential.UserName + "@" + authenticator.Credential.Domain;
                if (PressAutoStoreButton())
                {
                    authenticator.LazyAuthOnly = true;
                    authenticator.Authenticate();
                }
                else
                {
                    throw new DeviceWorkflowException("Login screen not found within 15 seconds.");
                }
            }
            else // AuthenticationMode.Eager
            {
                throw new DeviceWorkflowException("Eager authentication is not allowed by the AutoStore application at this time.");
            }

            if (!_engine.WaitForHtmlContains(ButtonTitle, TimeSpan.FromSeconds(25)))
            {
                throw new DeviceWorkflowException("AutoStore application did not show within 25 seconds.");
            }

            RecordEvent(DeviceWorkflowMarker.AppShown);
        }
예제 #10
0
        /// <summary>
        /// Launches HPAC with the specified authenticator using the given authentication mode
        /// </summary>
        /// <param name="authenticator">The authenticator.</param>
        /// <param name="authenticationMode">The authentication mode, eager or lazy.</param>
        /// <exception cref="System.NotImplementedException"></exception>
        public override void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
        {
            _launchHelper.WorkflowLogger = WorkflowLogger;
            if (authenticationMode.Equals(AuthenticationMode.Eager))
            {
                switch (authenticator.Provider)
                {
                case AuthenticationProvider.Card:
                case AuthenticationProvider.Skip:
                    break;

                default:
                    _launchHelper.PressSignInButton();
                    break;
                }

                Authenticate(authenticator, JediOmniLaunchHelper.SignInOrSignoutButton);
                PressHpacSolutionButton(JediOmniLaunchHelper.LazySuccessScreen);
            }
            else // AuthenticationMode.Lazy
            {
                PressHpacSolutionButton(JediOmniLaunchHelper.SignInForm);
                Authenticate(authenticator, JediOmniLaunchHelper.LazySuccessScreen);
            }
            RecordEvent(DeviceWorkflowMarker.AppShown);
        }
예제 #11
0
        /// <summary>
        /// Signs into HPCR using given authenticator using desired authentication mode
        /// </summary>
        /// <param name="authenticator"></param>
        /// <param name="authenticationMode"></param>
        public override void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
        {
            if (authenticationMode.Equals(AuthenticationMode.Eager))
            {
                // Press Sign In button
                _controlPanel.PressByValue("Sign In");

                if (_controlPanel.WaitForScreenId("login", StringMatch.Contains))
                {
                    authenticator.Authenticate();
                    PressHpcrWorkflowButton(_buttonTitle);
                }
                else
                {
                    throw new DeviceWorkflowException("Timed out waiting for Sign In screen.");
                }
            }
            else // AuthenticationMode.Lazy
            {
                PressHpcrWorkflowButton(_buttonTitle);

                authenticator.Authenticate();
                _controlPanel.WaitForScreenLabel("vw_sips_apps_state", TimeSpan.FromSeconds(30));
                WaitForControl("HP Capture", TimeSpan.FromSeconds(6));
            }

            RecordEvent(DeviceWorkflowMarker.AppShown);
        }
        /// <summary>
        /// Launches Scan to Network Folder using the specified authenticator and authentication mode.
        /// </summary>
        /// <param name="authenticator">The authenticator.</param>
        /// <param name="authenticationMode">The authentication mode.</param>
        /// <exception cref="DeviceWorkflowException"></exception>
        /// <exception cref="System.NotImplementedException">Eager authentication has not been implemented for this solution.</exception>
        public void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
        {
            if (authenticationMode.Equals(AuthenticationMode.Lazy))
            {
                try
                {
                    _controlPanel.Press("cScanHomeTouchButton");
                    if (_controlPanel.WaitForDisplayedText("Scan Menu", TimeSpan.FromSeconds(1)))
                    {
                        _controlPanel.Press("cScanToNetworkFolder");
                    }
                    Thread.Sleep(TimeSpan.FromSeconds(2));
                    authenticator.Authenticate();
                    Thread.Sleep(_controlPanel.DefaultWaitTime);

                    //Check control panel for errors
                    List <string> errorMessage = _controlPanel.GetDisplayedStrings().ToList();

                    if (errorMessage.Contains("Your printer was unable to connect to\nthe server.\nCheck your network connection and try\nagain."))
                    {
                        throw new DeviceWorkflowException($"Could not sign in: {errorMessage}");
                    }
                }
                catch (PhoenixInvalidOperationException ex)
                {
                    throw new DeviceWorkflowException($"Could not launch Select network folder page: {ex.Message}", ex);
                }
            }
            else
            {
                throw new NotImplementedException("Eager authentication has not been implemented for this solution.");
            }
        }
예제 #13
0
 /// <summary>
 /// Launches The AutoStore solution with the given authenticator with either eager or lazy authentication.
 /// </summary>
 /// <param name="authenticator">The authenticator.</param>
 /// <param name="authenticationMode">The authentication mode.</param>
 /// <exception cref="DeviceWorkflowException">
 /// Login screen not found.
 /// or
 /// Eager authentication is not allowed by the AutoStore application at this time.
 /// </exception>
 public override void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
 {
     if (authenticationMode.Equals(AuthenticationMode.Lazy))
     {
         try
         {
             UpdateStatus("Launch App: Udocx Scan");
             _controlPanel.ScrollPress($"div[aria-label=\"Udocx\"]");
             RecordEvent(DeviceWorkflowMarker.AppButtonPress, "Udocx");
             IsSignInScreen();
             authenticator.LazyAuthOnly = true;
             authenticator.Authenticate();
         }
         catch (Exception ex)
         {
             DeviceWorkflowException e = new DeviceWorkflowException("Fail to Signin Udocx Scan App", ex);
             throw e;
         }
     }
     else // AuthenticationMode.Eager
     {
         throw new DeviceWorkflowException("Eager authentication is not allowed by the UdocxScan application at this time.");
     }
     RecordEvent(DeviceWorkflowMarker.AppShown);
 }
예제 #14
0
        /// <summary>
        /// Determines and presses the button for the desired HPCR workflow.
        /// </summary>
        /// <param name="authenticationMode">The authentication mode.</param>
        /// <exception cref="HP.DeviceAutomation.Jedi.ControlNotFoundException">Unable to press control,  + _buttonTitle + , at this time.</exception>
        private void PressHPCR_WorkflowButton(AuthenticationMode authenticationMode)
        {
            //string elementId = ".hp-homescreen-button:contains(" + _buttonTitle + ")";
            string successScreen = (authenticationMode.Equals(AuthenticationMode.Eager) == true) ? JediOmniLaunchHelper.LazySuccessScreen : JediOmniLaunchHelper.SignInForm;

            UpdateStatus("Pressing the HPCR workflow button {0}.", _buttonTitle);

            _launchHelper.PressSolutionButton(_buttonTitle, "HPCR " + _buttonTitle, successScreen);
            //RecordEvent(DeviceWorkflowMarker.AppButtonPress, "HPCR " + _buttonTitle);
            //_controlPanel.ScrollPressWait(elementId, successScreen);
        }
예제 #15
0
 public override void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
 {
     if (authenticationMode.Equals(AuthenticationMode.Eager))
     {
         ActivateViaSignIn(authenticator);
     }
     else // AuthenticationMode.Lazy
     {
         ActivateViaAppButton(authenticator);
     }
 }
        /// <summary>Launch the solution.</summary>
        private void Launch()
        {
            AuthenticationMode am = (_activityData.HPRoamAuthentication == false) ? AuthenticationMode.Eager : AuthenticationMode.Lazy;

            if (am.Equals(AuthenticationMode.Eager))
            {
                OnStatusUpdate("Authenticating by pressing the Sign In button first.");
            }
            else // AuthenticationMode.Lazy
            {
                OnStatusUpdate("Authenticating by pressing the Hp Roam Button first.");
            }

            _hpRoamApp.Launch(Authenticator, am);
            OnStatusUpdate("Authentication complete.");
        }
예제 #17
0
 /// <summary>
 /// Opens Contacts screen with the specified authenticator using the given authentication mode.
 /// </summary>
 /// <param name="authenticator">The authenticator.</param>
 /// <param name="authenticationMode">The authentication mode.</param>
 public void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
 {
     if (authenticationMode.Equals(AuthenticationMode.Lazy))
     {
         if (PressContactsHomescreenButton())
         {
             // sign in form is present
             Authenticate(authenticator, "#hpid-contacts-app-screen");
         }
     }
     else
     {
         throw new NotImplementedException("Eager authentication has not been implemented for this solution.");
     }
     RecordEvent(DeviceWorkflowMarker.AppShown);
 }
 /// <summary>
 /// Launches the Copy application using the specified authenticator, authentication mode, and quickset.
 /// </summary>
 /// <param name="authenticator">The authenticator.</param>
 /// <param name="authenticationMode">The authentication mode.</param>
 /// <param name="quickSetName">Name of the quick set.</param>
 /// <exception cref="DeviceWorkflowException">Not supported in Jedi Windjammer device</exception>
 public void LaunchFromQuickSet(IAuthenticator authenticator, AuthenticationMode authenticationMode, string quickSetName)
 {
     if (authenticationMode.Equals(AuthenticationMode.Lazy))
     {
         if (PressScanToEmailQuickSet(quickSetName))
         {
             Authenticate(authenticator, "EmailForm");
         }
     }
     else  // AuthenticationMode.Eager
     {
         RecordEvent(DeviceWorkflowMarker.DeviceButtonPress, "Sign In");
         _controlPanel.PressWait(JediWindjammerLaunchHelper.SIGNIN_BUTTON, JediWindjammerLaunchHelper.SIGNIN_FORM);
         Authenticate(authenticator, JediWindjammerLaunchHelper.HOMESCREEN_FORM);
         PressScanToEmailQuickSet(quickSetName);
     }
 }
        /// <summary>
        /// Launches Scan to Network Folder using the specified authenticator and authentication mode.
        /// </summary>
        /// <param name="authenticator">The authenticator.</param>
        /// <param name="authenticationMode">The authentication mode.</param>
        /// <exception cref="DeviceWorkflowException">
        /// Network Folder button was not found on device home screen.
        /// or
        /// or
        /// </exception>
        /// <exception cref="System.NotImplementedException">Eager authentication has not been implemented for this solution.</exception>
        public void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
        {
            if (authenticationMode.Equals(AuthenticationMode.Lazy))
            {
                try
                {
                    _controlPanel.Press("home_screen_table_menu.2");
                    _controlPanel.WaitForActiveScreenLabel("view_scan_home", TimeSpan.FromSeconds(10)); //Scan To Page
                    Pacekeeper.Sync();

                    RecordEvent(DeviceWorkflowMarker.AppButtonPress, "NetworkFolder");
                    _controlPanel.Press("scan_home_screen_table_menu.2");
                    Pacekeeper.Sync();

                    if (_controlPanel.ActiveScreenLabel() != "view_scan_folder_presets")
                    {
                        authenticator.Authenticate();
                    }

                    _controlPanel.WaitForActiveScreenLabel("view_scan_folder_presets", TimeSpan.FromSeconds(30)); //Network folder page
                    RecordEvent(DeviceWorkflowMarker.AppShown);
                    Pacekeeper.Sync();
                }
                catch (ElementNotFoundException ex)
                {
                    string currentScreen = _controlPanel.ActiveScreenLabel();
                    if (currentScreen == "view_scan_home")
                    {
                        throw new DeviceWorkflowException("Network Folder button was not found on device home screen.", ex);
                    }
                    else
                    {
                        throw new DeviceWorkflowException($"Cannot launch the Network Folder application from {currentScreen}.", ex);
                    }
                }
                catch (SiriusInvalidOperationException ex)
                {
                    throw new DeviceWorkflowException($"Could not launch Network Folder application: {ex.Message}", ex);
                }
            }
            else
            {
                throw new NotImplementedException("Eager authentication has not been implemented for this solution.");
            }
        }
예제 #20
0
 /// <summary>
 /// Launches the FAX solution with the specified authenticator using the given authentication mode.
 /// </summary>
 /// <param name="authenticator">The authenticator.</param>
 /// <param name="authenticationMode">The authentication mode.</param>
 /// <exception cref="DeviceWorkflowException">Fax application button was not found on device home screen.</exception>
 /// <exception cref="System.NotImplementedException">Eager authentication has not been implemented for this solution.</exception>
 public void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
 {
     if (authenticationMode.Equals(AuthenticationMode.Lazy))
     {
         if (PressFaxSolutionButton("SignInForm"))
         {
             Authenticate(authenticator);
         }
     }
     else
     {
         RecordEvent(DeviceWorkflowMarker.DeviceButtonPress, "Sign In");
         _controlPanel.PressWait(JediWindjammerLaunchHelper.SIGNIN_BUTTON, JediWindjammerLaunchHelper.SIGNIN_FORM);
         Authenticate(authenticator);
         PressFaxSolutionButton("SendFaxAppMainForm");
     }
     RecordEvent(DeviceWorkflowMarker.AppShown);
 }
예제 #21
0
 /// <summary>
 /// Launches the Copy application using the specified authenticator, authentication mode, and quickset.
 /// </summary>
 /// <param name="authenticator">The authenticator.</param>
 /// <param name="authenticationMode">The authentication mode.</param>
 /// <param name="quickSetName">Name of the quick set.</param>
 public void LaunchFromQuickSet(IAuthenticator authenticator, AuthenticationMode authenticationMode, string quickSetName)
 {
     if (authenticationMode.Equals(AuthenticationMode.Eager))
     {
         RecordEvent(DeviceWorkflowMarker.DeviceButtonPress, "Sign In");
         _controlPanel.PressWait(JediWindjammerLaunchHelper.SIGNIN_BUTTON, JediWindjammerLaunchHelper.SIGNIN_FORM);
         Authenticate(authenticator, JediWindjammerLaunchHelper.HOMESCREEN_FORM);
         PressCopyWithQuickset(quickSetName);
     }
     else // AuthenticationMode.Lazy
     {
         if (PressCopyWithQuickset(quickSetName))
         {
             // authentication required
             Authenticate(authenticator, "CopyAppMainForm");
         }
     }
 }
예제 #22
0
        /// <summary>
        /// Launches Blueprint with the specified authenticator using the given authentication mode
        /// </summary>
        /// <param name="authenticator">The authenticator.</param>
        /// <param name="authenticationMode">The authentication mode, eager or lazy.</param>
        public override void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
        {
            if (authenticationMode.Equals(AuthenticationMode.Eager))
            {
                RecordEvent(DeviceWorkflowMarker.DeviceButtonPress, "Sign In");
                _controlPanel.PressWait(JediWindjammerLaunchHelper.SIGNIN_BUTTON, JediWindjammerLaunchHelper.SIGNIN_FORM);
                Authenticate(authenticator, JediWindjammerLaunchHelper.HOMESCREEN_FORM);

                RecordEvent(DeviceWorkflowMarker.AppButtonPress, SolutionButtonTitle);
                _controlPanel.ScrollPressWait("mAccessPointDisplay", "Title", SolutionButtonTitle, JediWindjammerLaunchHelper.OxpdFormIdentifier, StringMatch.Contains, TimeSpan.FromSeconds(30));
            }
            else // AuthenticationMode.Lazy
            {
                RecordEvent(DeviceWorkflowMarker.AppButtonPress, SolutionButtonTitle);
                _controlPanel.ScrollPressWait("mAccessPointDisplay", "Title", SolutionButtonTitle, JediWindjammerLaunchHelper.SIGNIN_FORM, TimeSpan.FromSeconds(30));
                Authenticate(authenticator, JediWindjammerLaunchHelper.OxpdFormIdentifier);
            }
        }
 /// <summary>
 /// Launches the Copy application using the specified authenticator and authentication mode.
 /// </summary>
 /// <param name="authenticator">The authenticator.</param>
 /// <param name="authenticationMode">The authentication mode.</param>
 /// <exception cref="System.NotImplementedException"></exception>
 public void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
 {
     if (authenticationMode.Equals(AuthenticationMode.Lazy))
     {
         if (PressScanToEmailButton("SignInForm", TimeSpan.FromSeconds(6)))
         {
             Authenticate(authenticator, "EmailForm");
         }
     }
     else  // AuthenticationMode.Eager
     {
         RecordEvent(DeviceWorkflowMarker.DeviceButtonPress, "Sign In");
         _controlPanel.PressWait(JediWindjammerLaunchHelper.SIGNIN_BUTTON, JediWindjammerLaunchHelper.SIGNIN_FORM);
         Authenticate(authenticator, JediWindjammerLaunchHelper.HOMESCREEN_FORM);
         PressScanToEmailButton("EmailForm", TimeSpan.FromSeconds(3));
     }
     RecordEvent(DeviceWorkflowMarker.AppShown);
 }
예제 #24
0
 /// <summary>
 /// Launches Scan to Network Folder using the specified authenticator and authentication mode.
 /// </summary>
 /// <param name="authenticator">The authenticator.</param>
 /// <param name="authenticationMode">The authentication mode.</param>
 /// <exception cref="System.NotImplementedException"></exception>
 public void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
 {
     if (authenticationMode.Equals(AuthenticationMode.Lazy))
     {
         if (PressScanToNetworkFolderButton("SignInForm"))
         {
             Authenticate(authenticator, "FolderAppMainForm");
         }
     }
     else // AuthenticationMode.Eager
     {
         RecordEvent(DeviceWorkflowMarker.DeviceButtonPress, "Sign In");
         _controlPanel.PressWait(JediWindjammerLaunchHelper.SIGNIN_BUTTON, JediWindjammerLaunchHelper.SIGNIN_FORM);
         Authenticate(authenticator, JediWindjammerLaunchHelper.HOMESCREEN_FORM);
         PressScanToNetworkFolderButton("FolderAppMainForm");
     }
     RecordEvent(DeviceWorkflowMarker.AppShown);
 }
예제 #25
0
 /// <summary>
 /// Launches the FAX solution with the specified authenticator using the given authentication mode.
 /// </summary>
 /// <param name="authenticator">The authenticator.</param>
 /// <param name="authenticationMode">The authentication mode.</param>
 /// <exception cref="DeviceWorkflowException"></exception>
 /// <exception cref="System.NotImplementedException">Eager authentication has not been implemented for this solution.</exception>
 public void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
 {
     if (authenticationMode.Equals(AuthenticationMode.Lazy))
     {
         try
         {
             _executionManager.PressApplicationButton(_executionManager.FaxButton);
         }
         catch (PhoenixInvalidOperationException ex)
         {
             throw new DeviceWorkflowException($"Could not launch Copy application: {ex.Message}", ex);
         }
     }
     else
     {
         throw new NotImplementedException("Eager authentication has not been implemented for this solution.");
     }
 }
예제 #26
0
        /// <summary>
        /// Launches the Email application using the specified authenticator and authentication mode.
        /// </summary>
        /// <param name="authenticator">The authenticator.</param>
        /// <param name="authenticationMode">The authentication mode.</param>
        /// <exception cref="System.NotImplementedException"></exception>
        public void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
        {
            if (authenticationMode.Equals(AuthenticationMode.Lazy))
            {
                try
                {
                    _controlPanel.Press("home_screen_table_menu.2");
                    _controlPanel.WaitForActiveScreenLabel("view_scan_home", TimeSpan.FromSeconds(10)); //Scan To Page
                    Pacekeeper.Sync();

                    RecordEvent(DeviceWorkflowMarker.AppButtonPress);
                    _controlPanel.Press("scan_home_screen_table_menu.3");
                    Pacekeeper.Sync();

                    if (_controlPanel.ActiveScreenLabel() != "view_scan_email_job_menu_home")
                    {
                        authenticator.Authenticate();
                    }
                    _controlPanel.WaitForActiveScreenLabel("view_scan_email_job_menu_home", TimeSpan.FromSeconds(30)); //Email Form
                    RecordEvent(DeviceWorkflowMarker.AppShown);
                    Pacekeeper.Sync();
                }
                catch (ElementNotFoundException ex)
                {
                    string currentForm = _controlPanel.ActiveScreenLabel();
                    if (currentForm == "view_scan_home")
                    {
                        throw new DeviceWorkflowException("Email application button was not found on device home screen.", ex);
                    }
                    else
                    {
                        throw new DeviceWorkflowException($"Cannot launch the Email application from {currentForm}.", ex);
                    }
                }
                catch (SiriusInvalidOperationException ex)
                {
                    throw new DeviceWorkflowException($"Could not launch Email application: {ex.Message}", ex);
                }
            }
            else // AuthenticationMode.Eager
            {
                throw new NotImplementedException("Eager Authentication has not been implemented in SiriusUIv2EmailApp.");
            }
        }
예제 #27
0
        /// <summary>
        /// Launches SafeComUC Print All app with the specified authenticator using the given authentication mode
        /// </summary>
        /// <param name="authenticator">The authenticator.</param>
        /// <param name="authenticationMode">The authentication mode, eager or lazy.</param>
        public override void LaunchPrintAll(IAuthenticator authenticator, AuthenticationMode authenticationMode)
        {
            _launchHelper.WorkflowLogger = WorkflowLogger;

            if (authenticationMode.Equals(AuthenticationMode.Eager))
            {
                if (authenticator.Provider != AuthenticationProvider.Card)
                {
                    _launchHelper.PressSignInButton();
                }
                Authenticate(authenticator, JediOmniLaunchHelper.SignInOrSignoutButton);
                PressSafeComUCSolutionButton(JediOmniLaunchHelper.SignInOrSignoutButton, SolutionPrintAllButtonTitle);
            }
            else // AuthenticationMode.Lazy
            {
                PressSafeComUCSolutionButton(JediOmniLaunchHelper.SignInForm, SolutionPrintAllButtonTitle);
                Authenticate(authenticator, JediOmniLaunchHelper.SignInOrSignoutButton);
            }
        }
예제 #28
0
 /// <summary>
 /// Launches Scan to Network Folder using the specified authenticator and authentication mode.
 /// </summary>
 /// <param name="authenticator">The authenticator.</param>
 /// <param name="authenticationMode">The authentication mode.</param>
 /// <exception cref="DeviceWorkflowException"></exception>
 /// <exception cref="System.NotImplementedException">Eager authentication has not been implemented for this solution.</exception>
 public void Launch(IAuthenticator authenticator, AuthenticationMode authenticationMode)
 {
     if (authenticationMode.Equals(AuthenticationMode.Lazy))
     {
         try
         {
             _executionManager.PressApplicationButton(_executionManager.ScanButton);
             _executionManager.PressSolutionButton("Scan Menu", "cScanToNetworkFolder");
         }
         catch (PhoenixInvalidOperationException ex)
         {
             throw new DeviceWorkflowException($"Could not launch Select network folder page: {ex.Message}", ex);
         }
     }
     else
     {
         throw new NotImplementedException("Eager authentication has not been implemented for this solution.");
     }
 }
예제 #29
0
 /// <summary>
 /// Launches the Scan to USB application using the specified authenticator and authentication mode.
 /// </summary>
 /// <param name="authenticator">The authenticator.</param>
 /// <param name="authenticationMode">The authentication mode.</param>
 public void LaunchScanToUsb(IAuthenticator authenticator, AuthenticationMode authenticationMode)
 {
     if (authenticationMode.Equals(AuthenticationMode.Eager))
     {
         RecordEvent(DeviceWorkflowMarker.DeviceButtonPress, "Sign In");
         _controlPanel.PressWait(JediWindjammerLaunchHelper.SIGNIN_BUTTON, JediWindjammerLaunchHelper.SIGNIN_FORM);
         Authenticate(authenticator, JediWindjammerLaunchHelper.HOMESCREEN_FORM);
         PressSaveToUsbButton();
     }
     else // AuthenticationMode.Lazy
     {
         if (PressSaveToUsbButton())
         {
             // authentication required
             Authenticate(authenticator, SAVE_TO_USB_FORM);
         }
     }
     RecordEvent(DeviceWorkflowMarker.AppShown);
 }
예제 #30
0
 /// <summary>
 /// Launches the Print to USB application using the specified authenticator and authentication mode.
 /// </summary>
 /// <param name="authenticator">The authenticator.</param>
 /// <param name="authenticationMode">The authentication mode.</param>
 public void LaunchPrintFromUsb(IAuthenticator authenticator, AuthenticationMode authenticationMode)
 {
     if (authenticationMode.Equals(AuthenticationMode.Eager))
     {
         RecordEvent(DeviceWorkflowMarker.DeviceButtonPress, "Sign In");
         _controlPanel.PressWait(JediWindjammerLaunchHelper.SIGNIN_BUTTON, JediWindjammerLaunchHelper.SIGNIN_FORM);
         Authenticate(authenticator, JediWindjammerLaunchHelper.HOMESCREEN_FORM);
         PressRetrieveFromUsbButton("OpenFromUsbMainForm");
     }
     else // AuthenticationMode.Lazy
     {
         if (PressRetrieveFromUsbButton("SignInForm"))
         {
             // authentication required
             Authenticate(authenticator, "OpenFromUsbMainForm");
         }
     }
     RecordEvent(DeviceWorkflowMarker.AppShown);
 }