/// <summary> /// Enters the "To" email address. /// </summary> /// <param name="emailAddresses">The "To" email addresses.</param> public void EnterToAddress(IEnumerable <string> emailAddresses) { foreach (string address in emailAddresses) { if (_controlPanel.WaitForDisplayedText("From", HP.DeviceAutomation.StringMatch.Contains, TimeSpan.FromSeconds(6))) { string btnName = _executionManager.GetButtonName("cTo"); _controlPanel.Press(btnName); _controlPanel.WaitForVirtualButton("cNewTouchButton"); _controlPanel.Press("cNewTouchButton"); Pacekeeper.Pause(); _controlPanel.TypeOnVirtualKeyboard(address); Pacekeeper.Pause(); _controlPanel.Press(_executionManager.OkayButton); _controlPanel.WaitForVirtualButton("cNOString"); _controlPanel.Press("cNOString"); _controlPanel.WaitForVirtualButton("cDoneTouchButton"); _controlPanel.Press("cDoneTouchButton"); } } }
/// <summary> /// Executes the currently configured scan job. /// </summary> /// <param name="scanForm">The scan form.</param> /// <returns><c>true</c> if the job finishes (regardless of its ending status), <c>false</c> otherwise.</returns> public bool ExecuteScanJob(string scanForm) { bool done = false; try { if (_controlPanel.WaitForVirtualButton("cScanTouchButton", TimeSpan.FromSeconds(1))) { _controlPanel.Press("cScanTouchButton"); RecordEvent(DeviceWorkflowMarker.ScanJobBegin); Thread.Sleep(TimeSpan.FromSeconds(25)); done = true; } } catch (PhoenixInvalidOperationException ex) { throw new DeviceWorkflowException($"Could not start job: {ex.Message}"); } return(done); }