Beispiel #1
0
        /// <summary>
        /// Starts the current job and runs it to completion, using the specified />.
        /// </summary>
        public bool ExecutePrintJob()
        {
            bool             success  = false;
            JediOmniMasthead masthead = new JediOmniMasthead(_device);

            // for SFP's which have a slightly different workflow
            if (_controlPanel.CheckState("#hpid-select-usb-job-to-print-button", OmniElementState.Useable))
            {
                _controlPanel.Press("#hpid-select-usb-job-to-print-button");
            }
            if (_controlPanel.WaitForAvailable("#hpid-button-print-usb-start", TimeSpan.FromSeconds(5)))
            {
                RecordEvent(DeviceWorkflowMarker.PrintJobBegin);
                _controlPanel.Press("#hpid-button-print-usb-start");
                if (masthead.WaitForActiveJobsButtonState(true, TimeSpan.FromSeconds(20)))
                {
                    masthead.WaitForActiveJobsButtonState(false, TimeSpan.FromSeconds(120));
                    RecordEvent(DeviceWorkflowMarker.PrintJobEnd);
                    success = true;
                }
                else
                {
                    throw new DeviceWorkflowException("Unable to determine if print job started.");
                }
            }
            return(success);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="JediOmniMyQApp"/> class.
 /// </summary>
 /// <param name="device">The device.</param>
 public JediOmniMyQApp(JediOmniDevice device) : base(device.ControlPanel)
 {
     _controlPanel      = device.ControlPanel;
     _masthead          = new JediOmniMasthead(device);
     _launchHelper      = new JediOmniLaunchHelper(device);
     _idleTimeoutOffset = device.PowerManagement.GetInactivityTimeout().Subtract(TimeSpan.FromSeconds(10));
 }
        private const int _footerOffset   = 50;   // This is based on a 800 x 600 screen. If the screen is smaller, this value will likely need changing.

        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniHpcrApp"/> class.
        /// </summary>
        /// <param name="device">The device.</param>
        /// <param name="buttonTitle">The button title.</param>
        /// <param name="scanDestination">The scan destination.</param>
        /// <param name="scanDistribution">The scan distribution.</param>
        /// <param name="documentName">Name of the document.</param>
        /// <param name="imagePreview">if set to <c>true</c> [image preview].</param>
        public JediOmniHpcrApp(JediOmniDevice device, string buttonTitle, string scanDestination, string scanDistribution, string documentName, bool imagePreview)
            : base()
        {
            _buttonTitle       = buttonTitle;
            _device            = device;
            _controlPanel      = device.ControlPanel;
            _documentName      = documentName;
            _scanDestination   = scanDestination;
            _scanDistribution  = scanDistribution;
            _imagePreview      = imagePreview;
            _idleTimeoutOffset = device.PowerManagement.GetInactivityTimeout().Subtract(TimeSpan.FromSeconds(10));

            _masthead     = new JediOmniMasthead(_device);
            _launchHelper = new JediOmniLaunchHelper(device);
            _engine       = new OxpdBrowserEngine(_device.ControlPanel, HpcrResource.HpcrJavaScript);

            _screenWidth = _controlPanel.GetScreenSize().Width;

            if (_screenWidth.Equals(1024))
            {
                _yOffset     = 75;
                _panelBottom = 640;
            }
            else if (_screenWidth.Equals(480))
            {
                _yOffset          = 40;
                _swipeBottomIndex = 3;
                _panelBottom      = 215;
            }
        }
Beispiel #4
0
        private bool UseSafeComLdap()
        {
            bool             useSafeComLdap = true;
            JediOmniMasthead masthead       = new JediOmniMasthead(ControlPanel);

            if (ControlPanel.CheckState(masthead.MastheadSpinner, OmniElementState.Exists))
            {
                if (Wait.ForTrue(() => masthead.BusyStateActive(), TimeSpan.FromSeconds(30)))
                {
                    throw new DeviceWorkflowException("SafeCom Authentication screen did not show within 30 seconds.");
                }
            }
            if (ControlPanel.WaitForAvailable(AuthDropdownId, TimeSpan.FromSeconds(30)))
            {
                string value = GetSignInText();
                if (value.Contains("code", StringComparison.OrdinalIgnoreCase))
                {
                    useSafeComLdap = false;
                }
            }
            else
            {
                throw new DeviceWorkflowException("Unable to determine type of authentication (LDAP/PIN) for SafeCom.");
            }
            return(useSafeComLdap);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="JediOmniHpRoamApp"/> class.
 /// </summary>
 /// <param name="device">The device.</param>
 public JediOmniHpRoamApp(JediOmniDevice device)
     : base(device.Snmp, device.ControlPanel)
 {
     _controlPanel         = device.ControlPanel;
     _launchHelper         = new JediOmniLaunchHelper(device);
     _jediOmniPopupManager = new JediOmniPopupManager(_controlPanel);
     _masthead             = new JediOmniMasthead(device);
 }
Beispiel #6
0
 /// <param name="device"></param>
 public JediOmniUdocxScanApp(JediOmniDevice device)
     : base(device.ControlPanel)
 {
     _controlPanel      = device.ControlPanel;
     _launchHelper      = new JediOmniLaunchHelper(device);
     _masthead          = new JediOmniMasthead(device);
     _idleTimeoutOffset = device.PowerManagement.GetInactivityTimeout().Subtract(TimeSpan.FromSeconds(10));
     _engine            = new OxpdBrowserEngine(_controlPanel, UdocxScanResource.UdocxScanJavaScript);
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniHpacApp"/> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediOmniHpacApp(JediOmniDevice device)
            : base(device.Snmp, device.ControlPanel)
        {
            _controlPanel = device.ControlPanel;
            _launchHelper = new JediOmniLaunchHelper(device);

            _masthead    = new JediOmniMasthead(device);
            IsWindJammer = false;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniiSecStarApp"/> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediOmniiSecStarApp(JediOmniDevice device)
            : base(device.Snmp, device.ControlPanel)
        {
            _controlPanel = device.ControlPanel;
            _controlPanel.DefaultWaitTime = TimeSpan.FromSeconds(2);
            _launchHelper = new JediOmniLaunchHelper(device);

            _masthead = new JediOmniMasthead(device);
        }
Beispiel #9
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniBlueprintApp"/> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediOmniBlueprintApp(JediOmniDevice device)
            : base(device.Snmp, device.ControlPanel)
        {
            _controlPanel = device.ControlPanel;
            _launchHelper = new JediOmniLaunchHelper(device);
            _masthead     = new JediOmniMasthead(device);

            _engine = new OxpdBrowserEngine(device.ControlPanel);

            _idleTimeoutOffset = device.PowerManagement.GetInactivityTimeout().Subtract(TimeSpan.FromSeconds(10));
        }
Beispiel #10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniAutoStoreApp" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        /// <param name="appButtonTitle">The application button title.</param>
        /// <param name="documentName">Name of the document.</param>
        public JediOmniAutoStoreApp(JediOmniDevice device, string appButtonTitle, string documentName) : base()
        {
            ButtonTitle  = appButtonTitle;
            DocumentName = documentName;

            _device       = device;
            _controlPanel = device.ControlPanel;

            _masthead = new JediOmniMasthead(_device);
            _engine   = new OxpdBrowserEngine(_device.ControlPanel, AutoStoreResource.AutoStoreJavaScript);

            _idleTimeoutOffset = device.PowerManagement.GetInactivityTimeout().Subtract(TimeSpan.FromSeconds(10));
            ScreenWidth        = _controlPanel.GetScreenSize().Width;
        }
        /// <summary>
        /// Constructor for JediOmin Device.
        /// </summary>
        /// <param name="device">JediOmni Device </param>
        public JediOmniJobStoragePrintApp(JediOmniDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _device            = device;
            _controlPanel      = _device.ControlPanel;
            _optionsManager    = new JediOmniJobStorageJobOptions(device);
            _executionManager  = new JediOmniJobExecutionManager(device);
            _launchHelper      = new JediOmniLaunchHelper(device);
            _masthead          = new JediOmniMasthead(_device);
            _idleTimeoutOffset = device.PowerManagement.GetInactivityTimeout().Subtract(TimeSpan.FromSeconds(10));
            Pacekeeper         = new Pacekeeper(TimeSpan.Zero);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniDssWorkflowApp" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediOmniDssWorkflowApp(JediOmniDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _device              = device;
            _controlPanel        = _device.ControlPanel;
            _masthead            = new JediOmniMasthead(device);
            _launchHelper        = new JediOmniLaunchHelper(device);
            _notificationPanel   = new JediOmniNotificationPanel(device);
            _enhancedWorkflowApp = new DssEnhancedWorkflowApp(_controlPanel);
            _idleTimeoutOffset   = device.PowerManagement.GetInactivityTimeout().Subtract(TimeSpan.FromSeconds(10));
            _popupManager        = new JediOmniPopupManager(device);
            _engine              = new OxpdBrowserEngine(_device.ControlPanel, DssWorkflowResource.DssWorkflowJavaScript);

            Pacekeeper = new Pacekeeper(TimeSpan.Zero);
        }
        private bool UseSafeComLdap()
        {
            JediOmniMasthead masthead = new JediOmniMasthead(ControlPanel);

            DateTime start = DateTime.Now;

            if (ControlPanel.CheckState(masthead.MastheadSpinner, OmniElementState.Exists))
            {
                if (!Wait.ForTrue(() => masthead.BusyStateActive() == false, TimeSpan.FromSeconds(30)))
                {
                    throw new DeviceWorkflowException("SafeCom UC Authentication screen did not display within 30 seconds.");
                }
            }

            if (_engine.HtmlContains("Code"))
            {
                return(false);
            }
            return(true);
        }