/// <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> /// Deletes the field data located in the textbox /// </summary> public void DeleteFieldData() { Thread.Sleep(5000); var keyTexts = _controlPanel.GetDisplayedStrings(); int count = keyTexts.ElementAt(0).Length; for (int idx = 0; idx < count; idx++) { if (ButtonExist("Del")) { _controlPanel.Press("Del"); Thread.Sleep(300); } } Thread.Sleep(500); }
public string GenerateWpsPin() { NavigateToWireless(); _controlPanel.Press("cWirelessWPSSetup"); _pacekeeper.Pause(); if (_controlPanel.GetDisplayedStrings().ToString().Replace("\n", string.Empty).Contains("not available")) { throw new NotSupportedException("Wireless configuration is possible when the printer is in wireless connection"); } _controlPanel.Press("cWirelessGeneratePIN"); IEnumerable <string> items = _controlPanel.GetDisplayedStrings(); string pin = Regex.Match(items.First(x => x.Contains("PIN")), @"\d+").Value; return(pin); }