Beispiel #1
0
        public bool ExecuteJob(JediWindjammerControlPanel controlPanel)
        {
            _engine.PressElementById("startBtn");

            string script = "document.getElementById('statusPopDown').getElementsByTagName('label')[0].innerHTML";
            string status = controlPanel.ExecuteJavaScript(script);


            while (!status.Contains("Scanning"))
            {
                Thread.Sleep(100);
                status = controlPanel.ExecuteJavaScript(script);
            }
            RecordEvent(DeviceWorkflowMarker.ScanJobBegin);

            while (status.Contains("Scanning"))
            {
                Thread.Sleep(100);
                status = controlPanel.ExecuteJavaScript(script);
            }
            RecordEvent(DeviceWorkflowMarker.ScanJobEnd);
            RecordEvent(DeviceWorkflowMarker.SendingJobBegin);
            while (status.Contains("Sending"))
            {
                Thread.Sleep(100);
                status = controlPanel.ExecuteJavaScript(script);
            }
            RecordEvent(DeviceWorkflowMarker.SendingJobEnd);

            return(true);
        }