Example #1
0
 /// <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));
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UIExerciser" /> class.
 /// </summary>
 /// <param name="device">The <see cref="JediDevice" /> object.</param>
 internal UIExerciser(DirtyDeviceManager owner, JediOmniDevice device, JediOmniPreparationManager preparationManager)
 {
     _owner              = owner;
     _device             = device;
     _preparationManager = preparationManager;
     _controlPanel       = device.ControlPanel;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniAuthenticator"/> class.
        /// </summary>
        /// <param name="device">The device.</param>
        /// <param name="credential">The credential.</param>
        /// <param name="provider">The provider.</param>
        public JediOmniAuthenticator(JediOmniDevice device, AuthenticationCredential credential, AuthenticationProvider provider)
            : base(credential, provider)
        {
            ControlPanel = device.ControlPanel;
            _provider    = provider;

            // The ProviderMap maps the text on the device, authentication drop down, to the authentication provider enum.

            ProviderMap.Add(AuthenticationProvider.Windows, new ProviderMapItem("Windows", "Windows"));
            ProviderMap.Add(AuthenticationProvider.DSS, new ProviderMapItem("DSS", "DSS"));
            ProviderMap.Add(AuthenticationProvider.LDAP, new ProviderMapItem("LDAP", "LDAP"));
            ProviderMap.Add(AuthenticationProvider.LocalDevice, new ProviderMapItem("Local Device", "Local Device"));
            ProviderMap.Add(AuthenticationProvider.SafeCom, new ProviderMapItem("SafeCom", "SafeCom"));
            ProviderMap.Add(AuthenticationProvider.SafeComUC, new ProviderMapItem("KOFAX", "KOFAX"));
            ProviderMap.Add(AuthenticationProvider.HpacDra, new ProviderMapItem("HPAC - DRA Server", "HPAC - DRA Server"));
            ProviderMap.Add(AuthenticationProvider.HpacIrm, new ProviderMapItem("HPAC - IRM Server", "HPAC - IRM Server"));
            ProviderMap.Add(AuthenticationProvider.HpacAgentLess, new ProviderMapItem("IRM Authentication", "IRM Authentication"));
            ProviderMap.Add(AuthenticationProvider.HpacPic, new ProviderMapItem("HPAC - PIC Server", "HPAC - PIC Server"));
            ProviderMap.Add(AuthenticationProvider.HpacWindows, new ProviderMapItem("HPAC-Windows", "HPAC-Windows"));
            ProviderMap.Add(AuthenticationProvider.Equitrac, new ProviderMapItem("Equitrac Authentication Agent", "Equitrac Authentication Agent"));
            ProviderMap.Add(AuthenticationProvider.EquitracWindows, new ProviderMapItem("Equitrac Authentication Agent", "Equitrac Authentication Agent"));
            ProviderMap.Add(AuthenticationProvider.Blueprint, new ProviderMapItem("Pharos Authentication Agent", "Pharos Authentication Agent"));
            ProviderMap.Add(AuthenticationProvider.PaperCut, new ProviderMapItem("PaperCut", "PaperCut"));
            ProviderMap.Add(AuthenticationProvider.ISecStar, new ProviderMapItem("User Authentication", "User Authentication"));
            ProviderMap.Add(AuthenticationProvider.Celiveo, new ProviderMapItem("Celiveo Authentication", "Celiveo Authentication"));
            ProviderMap.Add(AuthenticationProvider.SafeQ, new ProviderMapItem("YSoft SafeQ", "YSoft SafeQ"));
            ProviderMap.Add(AuthenticationProvider.AutoStore, new ProviderMapItem("AutoStore", "AutoStore"));
            ProviderMap.Add(AuthenticationProvider.PaperCutAgentless, new ProviderMapItem("PaperCut MF", "PaperCut MF"));
            ProviderMap.Add(AuthenticationProvider.UdocxScan, new ProviderMapItem("Udocx Scan", "Udocx Scan"));
            ProviderMap.Add(AuthenticationProvider.GeniusBytesGuest, new ProviderMapItem("Genius Bytes Guest Login", "Genius Bytes Guest Login"));
            ProviderMap.Add(AuthenticationProvider.GeniusBytesManual, new ProviderMapItem("Genius Bytes Manual Login", "Genius Bytes Manual Login"));
            ProviderMap.Add(AuthenticationProvider.GeniusBytesPin, new ProviderMapItem("Genius Bytes PIN Login", "Genius Bytes PIN Login"));
            ProviderMap.Add(AuthenticationProvider.HpRoamPin, new ProviderMapItem("Embedded Badge Authentication", "Embedded Badge Authentication"));
            ProviderMap.Add(AuthenticationProvider.HpId, new ProviderMapItem("HP Login", "HP Login"));
        }
Example #4
0
        public static bool WaitForValue(JediOmniDevice device, string elementSelector, string propertyName, OmniPropertyType propertyType, string expectedPropertyValue, StringMatch match, StringComparison comparison, TimeSpan waitTimeForElement, TimeSpan waitTimeForProperty)
        {
            DateTime endTime             = DateTime.Now + waitTimeForElement;
            string   actualPropertyValue = null;
            bool     elementExists       = false;

            do
            {
                if (device.ControlPanel.CheckState(elementSelector, OmniElementState.Exists))
                {
                    if (!elementExists)
                    {
                        endTime       = DateTime.Now + waitTimeForProperty;
                        elementExists = true;
                    }

                    actualPropertyValue = device.ControlPanel.GetValue(elementSelector, propertyName, propertyType);

                    if (StringMatcher.IsMatch(expectedPropertyValue, actualPropertyValue, match, comparison))
                    {
                        return(true);
                    }
                }
                else
                {
                    Thread.Sleep(100);
                }
            }while (DateTime.Now < endTime);

            return(false);
        }
Example #5
0
        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;
            }
        }
Example #6
0
        private void InitializeDevice()
        {
            try
            {
                OnUpdateStatus(this, "Initializing device.");
                _device             = (JediOmniDevice)DeviceConstructor.Create(_deviceInfo);
                _preparationManager = new JediOmniPreparationManager(_device);

                _digitalSendExerciser = new DigitalSendExerciser(this, _device, _preparationManager);
                _ewsExerciser         = new EwsExerciserViaSeleniumWebDriver(this, _device);
                _printExerciser       = new PrintExerciser(this, _device);
                _snmpExerciser        = new SnmpExerciser(this, _device);
                _uiExerciser          = new UIExerciser(this, _device, _preparationManager);
                _webServicesExerciser = new WebServicesExerciser(this, _device);

                _preparationManager.InitializeDevice(true);
            }
            catch (Exception ex)
            {
                OnUpdateStatus(this, ex.ToString());
                OnUpdateStatus(this, "Cleaning up.");

                _device?.Dispose();

                // Log the error and re-throw.
                ExecutionServices.SystemTrace.LogError(ex);
                throw;
            }
        }
Example #7
0
 /// <summary>
 /// Configuration to prepare job for Each Link Apps.
 /// <param name="device">The device</param>
 /// </summary>
 public KioskApp(IDevice device)
 {
     KioskPackageName = $"com.samsung.dpd.kiosk.ui.activity";
     LinkUI           = new JetAdvantageLinkUI(device);
     Device           = (JediOmniDevice)device;
     JetAdvantageLinkControlHelper = new JetAdvantageLinkControlHelper(LinkUI, KioskPackageName);
     KioskOptionManager            = new KioskOptionsManager(LinkUI, KioskPackageName);
 }
 /// <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);
 }
Example #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DigitalSendExerciser" /> class.
 /// </summary>
 /// <param name="device">The <see cref="JediDevice" /> object.</param>
 internal DigitalSendExerciser(DirtyDeviceManager owner, JediOmniDevice deviceDat, JediOmniPreparationManager preparationManager)
 {
     _owner                 = owner;
     _deviceDat             = deviceDat;
     _preparationManager    = preparationManager;
     _webServices           = _deviceDat.WebServices;
     DateTimeStampForNaming = DateTime.Now.ToString($"yyyyMMdd_HHmmss");
 }
Example #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JediOmniHpecApp"/> class.
 /// </summary>
 /// <param name="device">The device.</param>
 public JediOmniHpecApp(JediOmniDevice device)
 {
     _device            = device;
     _controlPanel      = _device.ControlPanel;
     _launchHelper      = new JediOmniLaunchHelper(device);
     _notificationPanel = new JediOmniNotificationPanel(device);
     _engine            = new OxpdBrowserEngine(_device.ControlPanel, HpecResource.HpecJavaScript);
 }
 /// <summary>
 /// Constructs a new instance of <see cref="JediOmniSkipAuthenticator" />
 /// </summary>
 /// <param name="device"></param>
 /// <param name="credential"></param>
 public JediOmniSkipAuthenticator(IDevice device, AuthenticationCredential credential)
 {
     Device               = (JediOmniDevice)device;
     Credential           = credential;
     Provider             = AuthenticationProvider.Skip;
     InitializationMethod = AuthenticationInitMethod.DoNotSignIn;
     LazyAuthOnly         = false;
 }
Example #12
0
 /// <summary>
 /// Configuration to prepare job for Each Link Apps.
 /// <param name="device">The device</param>
 /// </summary>
 public RegusKioskApp(IDevice device)
 {
     KioskPackageName = $"com.hp.kiosk";
     RegusPackageName = $"com.hp.auth.regus";
     LinkUI           = new JetAdvantageLinkUI(device);
     Device           = (JediOmniDevice)device;
     JetAdvantageLinkControlHelper = new JetAdvantageLinkControlHelper(LinkUI, KioskPackageName);
     KioskOptionManager            = new RegusKioskOptionsManager(LinkUI, KioskPackageName);
 }
Example #13
0
 /// <summary>
 /// Configuration to prepare job for Each Link Apps.
 /// </summary>
 /// <param name="destinaion"></param>
 /// <param name="device"></param>
 public LinkScanApp(LinkScanDestination destinaion, IDevice device)
 {
     _destination            = destinaion.GetDescription();
     LinkScanAppsPackageName = $"com.hp.print.scanapps.{_destination.ToLower()}";
     LinkUI                        = new JetAdvantageLinkUI(device);
     ScanOptionManager             = new JetAdvantageLinkScanOptionManager(LinkUI, LinkScanAppsPackageName);
     Device                        = (JediOmniDevice)device;
     JetAdvantageLinkControlHelper = new JetAdvantageLinkControlHelper(LinkUI, LinkScanAppsPackageName);
 }
        /// <summary>
        /// Creates a new instance of JediOmniQuicksetManager.
        /// </summary>
        /// <param name="device"></param>
        public JediOmniQuicksetManager(JediOmniDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _controlPanel = device.ControlPanel;
        }
Example #15
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniMasthead" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        /// <exception cref="ArgumentNullException"><paramref name="device" /> is null.</exception>
        public JediOmniMasthead(JediOmniDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _controlPanel = device.ControlPanel;
        }
Example #16
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);
 }
Example #17
0
        /// <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;
        }
Example #18
0
 public BundleInstaller(JediOmniDevice device)
 {
     Device  = device;
     Handler = new HttpClientHandler {
         AllowAutoRedirect = true, UseCookies = false
     };
     ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); };
     ServicePointManager.Expect100Continue = 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);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniPreparationManager" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediOmniPreparationManager(JediOmniDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _device       = device;
            _controlPanel = _device.ControlPanel;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniLaunchHelper" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        /// <exception cref="ArgumentNullException"><paramref name="device" /> is null.</exception>
        public JediOmniLaunchHelper(JediOmniDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _controlPanel      = device.ControlPanel;
            _notificationPanel = new JediOmniNotificationPanel(device);
        }
Example #22
0
        public static void WakeDevice(JediOmniDevice device)
        {
            const string _sleepOverlay = "#hpid-sleep-modal-overlay";

            device.PowerManagement.Wake();

            // The WaitForState call is necessary for Omni because a div overlays the screen during sleep, making the control panel unusable until device wakes enough to remove it.
            // To simulate UX more closely, button presses ultimately resolve to X-Y coordinate presses on top-level control visible rather than direct javascript
            // manipulation of the element.  Therefore prematurely trying to press an element will result in an exception.
            device.ControlPanel.WaitForState(_sleepOverlay, OmniElementState.Exists, false);
        }
Example #23
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));
        }
Example #24
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniJobOptionsManager" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediOmniJobOptionsManager(JediOmniDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _device       = device;
            _deviceScreen = new DeviceScreen(device.ControlPanel);
            _controlPanel = _device.ControlPanel;
        }
Example #25
0
        /// <summary>
        /// Configuration to prepare job for Each Link Apps.
        /// </summary>
        /// <param name="device"></param>
        public iManageApp(IDevice device)
        {
            _appName = GetLaunchAppname();
            iManageAppsPackageName = $"com.hp.imanageconnector";

            LinkUI                        = new JetAdvantageLinkUI(device);
            PrintOptionManager            = new JetAdvantageLinkPrintOptionManager(LinkUI, iManageAppsPackageName);
            ScanOptionManager             = new JetAdvantageLinkScanOptionManager(LinkUI, iManageAppsPackageName);
            Device                        = (JediOmniDevice)device;
            JetAdvantageLinkControlHelper = new JetAdvantageLinkControlHelper(LinkUI, iManageAppsPackageName);
            _inactivityTimeLimit          = GetInactivityTimeout();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniTraySettingsApp" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediOmniTraySettingsApp(JediOmniDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _device             = device;
            _controlPanel       = _device.ControlPanel;
            _preparationManager = new JediOmniPreparationManager(device);
            Pacekeeper          = new Pacekeeper(TimeSpan.Zero);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniContactsApp" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediOmniContactsApp(JediOmniDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _device       = device;
            _controlPanel = _device.ControlPanel;
            // _optionsManager = new JediOmniFaxJobOptions(device);
            _preparationManager = new JediOmniPreparationManager(device);
            Pacekeeper          = new Pacekeeper(TimeSpan.Zero);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="JediOmniJobExecutionManager" /> class.
        /// </summary>
        /// <param name="device">The device.</param>
        public JediOmniJobExecutionManager(JediOmniDevice device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            _device            = device;
            _controlPanel      = _device.ControlPanel;
            _optionsManager    = new JediOmniJobOptionsManager(_device);
            _popupManager      = new JediOmniPopupManager(_device);
            _masthead          = new JediOmniMasthead(_device);
            _idleTimeoutOffset = device.PowerManagement.GetInactivityTimeout().Subtract(TimeSpan.FromSeconds(10));
        }
        /// <summary>
        /// Constructor for JediOmin Device.
        /// </summary>
        /// <param name="device">JediOmni Device </param>
        public JediOmniJobStorageScanApp(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);
            Pacekeeper        = new Pacekeeper(TimeSpan.Zero);
        }
Example #30
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;
        }