public WebRouter(IWorkflowRepository workflowRepository, string webDirectory, string logFilePath) { _rootFileDirectory = webDirectory; IWorkflow workflow = new Workflow(workflowRepository); if (!string.IsNullOrEmpty(logFilePath)) { var logger = new FileWorkflowLog(logFilePath); workflow = new WorkflowLogger(logger, workflow); } var rendererFactory = new HtmlWorkStepRendererFactory(workflow); _workflowHandler = new WorkflowHttpHandler(workflow, rendererFactory); }
public WebRouter(IWorkflowRepository workflowRepository, string webDirectory, string logFilePath) { _rootFileDirectory = webDirectory; IWorkflow workflow = new Workflow(workflowRepository); if (!string.IsNullOrEmpty(logFilePath)) { var logger = new FileWorkflowLog(logFilePath); workflow = new WorkflowLogger(logger, workflow); } var rendererFactory = new HtmlWorkStepRendererFactory(workflow); _workflowHandler = new WorkflowHttpHandler(workflow, rendererFactory); }
/// <summary> /// Press the HP Roam app button on the phone. /// </summary> /// <param name="recordMarkers">Whether or not to record performance markers.</param> private void PressRoamAppButton(bool recordMarkers) { string appText = "HP Roam"; TimeSpan timeOut = TimeSpan.FromSeconds(30); if (_androidHelper.WaitForAvailableText(appText, timeOut)) { string msg = "Pressing the HP Roam App Button"; OnStatusUpdate(msg); ExecutionServices.SystemTrace.LogDebug(msg); if (recordMarkers) { WorkflowLogger?.RecordEvent(DeviceWorkflowMarker.AppButtonPress, appText); } _controller.Click(new UiSelector().TextContains(appText)); } else { new DeviceWorkflowException($"The HP Roam app button was not found within {timeOut.TotalSeconds} seconds."); } }
/// <summary> /// Records a performance event with the specified <see cref="DeviceWorkflowMarker" />. /// </summary> /// <param name="marker">The <see cref="DeviceWorkflowMarker" />.</param> protected void RecordEvent(DeviceWorkflowMarker marker) { WorkflowLogger.RecordEvent(marker); }