/// <summary> /// Starts the current job and runs it to completion, using the specified <see cref="ScanExecutionOptions" />. /// </summary> /// <param name="executionOptions">The execution options.</param> /// <returns></returns> /// <exception cref="DeviceWorkflowException"> /// Unknown AutoStore workflow requested: " + executionOptions.AutoStoreWorkflow /// or /// Unable to press the AutoStore workflow requested: " + executionOptions.AutoStoreWorkflow /// </exception> public override bool ExecuteJob(AutoStoreExecutionOptions executionOptions) { bool success = false; ExecutionOptions = executionOptions; _yOffset = OxpdBrowserEngine.GetBrowserOffset(_controlPanel); _footerPos = GetFooterTop("footerOXPd"); GetButtonIdsTitles(); if (success = PressWorkflowButton() == true) { TurnOnOffOptions(executionOptions, TimeSpan.FromSeconds(20)); if (executionOptions.AutoStoreWorkflow.Contains("Email")) { EmailFormInput(); } else if (executionOptions.AutoStoreWorkflow.Contains("Folder")) { FolderFormInput(); } else { throw new DeviceWorkflowException("Unknown AutoStore workflow requested: " + executionOptions.AutoStoreWorkflow); } ProcessWorkflow(); } else { throw new DeviceWorkflowException("Unable to press the AutoStore workflow requested: " + executionOptions.AutoStoreWorkflow); } return(success); }
/// <summary> /// Calls the helping methods for processing the various HPCR workflows. /// </summary> /// <returns>bool</returns> private bool ProcessForHpcr(int pageCount = 1) { bool bSuccess = true; _yOffset = OxpdBrowserEngine.GetBrowserOffset(_controlPanel); TimeSpan ts = TimeSpan.FromSeconds(6); ProcessHPCR_Workflows(); // if the document name is required for this app... if (IsDocumentFieldName()) { SetDocumentName(); // Press the next button PressHpcrButtonByCoordinate("More Options", 0); } VerifyReadyForScanning(true); ProcessHPCR_Work(pageCount, ts); RecordEvent(DeviceWorkflowMarker.ProcessingJobBegin); // press the done button based on its index _engine.WaitForHtmlContains("Done", TimeSpan.FromSeconds(6)); RecordEvent(DeviceWorkflowMarker.ProcessingJobEnd); PressHpcrButtonByCoordinate(string.Empty, 1); AtHomeScreen(ts); return(bSuccess); }
private void EmailFormInput() { int offSet = OxpdBrowserEngine.GetBrowserOffset(_controlPanel); int emailPanelBottom = _engine.GetBottomLocationById("inputForm");//_engine.GetBoundingAreaById("inputForm").Bottom + offSet; // The to address is being set by the server. I'm just commenting this out // in case we decide to do something different... //SetTextboxValue("to", _emailToAddress); int screenOffset = 150; int bottomOffset = 100; if (_controlPanel.GetScreenSize().Width.Equals(480)) { screenOffset = 10; bottomOffset = 3; } int location = _engine.GetBottomLocationById("subject"); if (location > emailPanelBottom) { SwipeScreen(offSet + screenOffset, emailPanelBottom - bottomOffset); } SetTextboxValue("subject", "Scanning via AutoStore " + ExecutionOptions.AutoStoreWorkflow); location = _engine.GetBottomLocationById("message"); if (location > emailPanelBottom) { SwipeScreen(offSet + screenOffset, emailPanelBottom - bottomOffset); } SetTextboxValue("message", "User " + EmailToAddress + " is utilizing AutoStore Email."); location = _engine.GetBottomLocationById("filename"); if (location > emailPanelBottom) { SwipeScreen(offSet + screenOffset, emailPanelBottom - bottomOffset); } SetTextboxValue("filename", DocumentName); }