/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerHpacAgentlessAuthenticator" /> class. /// </summary> /// <param name="controlPanel">The <see cref="JediWindjammerControlPanel"/> object.</param> /// <param name="credential">The <see cref="AuthenticationCredential"/> object.</param> /// <param name="pacekeeper">The <see cref="Pacekeeper"/> object.</param> public JediWindjammerHpacAgentlessAuthenticator(JediWindjammerControlPanel controlPanel, AuthenticationCredential credential, Pacekeeper pacekeeper) : base(controlPanel, credential, pacekeeper) { _engine = new OxpdBrowserEngine(ControlPanel); CreateExistElementFunction(); _hpacVersion16_6 = IsVersion16_6(); }
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); }
/// <summary> /// Constructor /// </summary> /// <param name="device"></param> /// <param name="credential"></param> public SafecomJedi(IDevice device, NetworkCredential credential) { //Getting the Sirius Device _device = device as JediWindjammerDevice; _controlPanel = _device.ControlPanel; _credential = credential; }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerHpacApp"/> class. /// </summary> /// <param name="device">The device.</param> public JediWindjammerHpacApp(JediWindjammerDevice device) : base(device.Snmp, device.ControlPanel) { _device = device; _controlPanel = device.ControlPanel; IsWindJammer = true; }
/// <summary> /// Initializes a new instance of the <see cref="JediWindJammerHpecApp"/> class. /// </summary> /// <param name="device">The device.</param> public JediWindJammerHpecApp(JediWindjammerDevice device) { _device = device; _controlPanel = _device.ControlPanel; _engine = new OxpdBrowserEngine(_controlPanel, HpecResource.HpecJavaScript); }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerJobExecutionManager" /> class. /// </summary> /// <param name="device">The device.</param> public JediWindjammerJobExecutionManager(JediWindjammerDevice device) { if (device == null) { throw new ArgumentNullException(nameof(device)); } _device = device; _controlPanel = _device.ControlPanel; }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerJobOptionsManager" /> class. /// </summary> /// <param name="device">The device.</param> /// <param name="appMainForm">The name of the main form of the associated device application.</param> public JediWindjammerJobOptionsManager(JediWindjammerDevice device, string appMainForm) { if (device == null) { throw new ArgumentNullException(nameof(device)); } _device = device; _controlPanel = _device.ControlPanel; _appMainForm = appMainForm; }
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="JediWindJammerHpcrApp"/> 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">Whether Image preview is on/off</param> public JediWindJammerHpcrApp(JediWindjammerDevice device, string buttonTitle, string scanDestination, string scanDistribution, string documentName, bool imagePreview) : base() { _buttonTitle = buttonTitle; _device = device; _controlPanel = device.ControlPanel; _documentName = documentName; _engine = new OxpdBrowserEngine(device.ControlPanel); _scanDestination = scanDestination; _scanDistribution = scanDistribution; _imagePreview = imagePreview; }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerEmailApp" /> class. /// </summary> /// <param name="device">The device.</param> public JediWindjammerEmailApp(JediWindjammerDevice device) { if (device == null) { throw new ArgumentNullException(nameof(device)); } _device = device; _controlPanel = _device.ControlPanel; _optionsManager = new JediWindjammerEmailJobOptions(device); _executionManager = new JediWindjammerJobExecutionManager(device); Pacekeeper = new Pacekeeper(TimeSpan.Zero); }
/// <summary> /// Gets the Y-offset of the OXPd web browser for the specified <see cref="JediWindjammerControlPanel" />. /// </summary> /// <param name="controlPanel">The control panel.</param> /// <returns>The Y-offset of the OXPd web browser control.</returns> /// <exception cref="DeviceInvalidOperationException">An OXPd browser control could not be found.</exception> public static int GetBrowserOffset(JediWindjammerControlPanel controlPanel) { var browsers = new[] { "mWebBrowser", "WebKitBrowser" }; var controls = controlPanel.GetControls(); foreach (string browser in browsers) { if (controls.Contains(browser, StringComparer.OrdinalIgnoreCase)) { return(controlPanel.GetProperty <int>(browser, "Top")); } } throw new DeviceInvalidOperationException("No known OXPd browser control was found on the control panel."); }
public WindjammerAuthenticatorDriver(JediWindjammerDevice device, string solutionButton, DeviceWorkflowLogger workflowLogger) { _device = device; _preparationManager = new JediWindjammerPreparationManager(_device); _workflowLogger = workflowLogger; _controlPanel = _device.ControlPanel; _solutionButton = solutionButton; _initMethod = AuthInitMethod.GetInitiationMethod(_solutionButton); PrepareDevice(); }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerAuthenticator"/> class. /// </summary> /// <param name="device">The device.</param> /// <param name="credential">The credential.</param> /// <param name="provider">The provider.</param> public JediWindjammerAuthenticator(JediWindjammerDevice device, AuthenticationCredential credential, AuthenticationProvider provider) : base(credential, provider) { ControlPanel = device.ControlPanel; _provider = provider; 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.HpacDra, new ProviderMapItem("HPAC - DRA Server", "HPAC - DRA Server")); ProviderMap.Add(AuthenticationProvider.HpacIrm, new ProviderMapItem("HPAC - IRM Server", "HPAC - IRM Server")); ProviderMap.Add(AuthenticationProvider.HpacWindows, new ProviderMapItem("HPAC-Windows", "HPAC-Windows")); ProviderMap.Add(AuthenticationProvider.HpacAgentLess, new ProviderMapItem("Code Expected", "Code Expected")); // HPAC AgentLess first screen ProviderMap.Add(AuthenticationProvider.Equitrac, new ProviderMapItem("Equitrac Embedded", "Equitrac Authentication Agent")); ProviderMap.Add(AuthenticationProvider.EquitracWindows, new ProviderMapItem("Equitrac-Windows", "Equitrac-Windows")); ProviderMap.Add(AuthenticationProvider.Blueprint, new ProviderMapItem("Pharos Authentication Service", "Pharos Authentication Service")); ProviderMap.Add(AuthenticationProvider.AutoStore, new ProviderMapItem("AutoStore", "AutoStore")); ProviderMap.Add(AuthenticationProvider.HpRoamPin, new ProviderMapItem("Embedded Badge Authentication", "Embedded Badge Authentication")); ProviderMap.Add(AuthenticationProvider.PaperCut, new ProviderMapItem("PaperCut", "PaperCut")); }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerAutoStoreApp"/> 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 JediWindjammerAutoStoreApp(JediWindjammerDevice device, string appButtonTitle, string documentName) : base() { ButtonTitle = appButtonTitle; DocumentName = documentName; _device = device; _controlPanel = device.ControlPanel; _engine = new OxpdBrowserEngine(_device.ControlPanel, AutoStoreResource.AutoStoreJavaScript); MoreOptionsBtnId = "HPOXPDMOREOPTIONS"; MoreOptionsDownArrowBtnId = "HPOXPDMOREOPTIONSPAGEDOWN"; MoreOptionsUpArrowBtnId = "HPOXPDMOREOPTIONSPAGEUP"; MoreOptionsImagePreview = "PreviewModeOption-button"; PreviewModeOffId = "HPOXPDDROPDOWNID#1OXPDID0"; PreviewModeOnId = "HPOXPDDROPDOWNID#1OXPDID1"; MoreOptionsJobBuild = "JobAssemblyModeOption-button"; JobBuildModeOffId = "HPOXPDDROPDOWNID#1OXPDID1"; JobBuildModeOnId = "HPOXPDDROPDOWNID#1OXPDID0"; }
private void AuthenticateWindjammer(string deviceIP, string userName) { IDevice device = DeviceFactory.Create(deviceIP, "!QAZ2wsx"); AuthenticationCredential credential = new AuthenticationCredential(userName, "1qaz2wsx", "etl.boi.rd.hpicorp.net"); JediWindjammerPreparationManager prepMgr = new JediWindjammerPreparationManager(((JediWindjammerDevice)device)); JediWindjammerControlPanel controlPanel = ((JediWindjammerDevice)device).ControlPanel; // Set up the device for Authentication //prepMgr.Reset(); controlPanel.PressWait(JediWindjammerLaunchHelper.SIGNIN_BUTTON, JediWindjammerLaunchHelper.SIGNIN_FORM); //IEnumerable<string> controls = controlPanel.GetControls(); //foreach (string s in controls) //{ // System.Diagnostics.Debug.WriteLine(s); //} IAuthenticator authenticator = AuthenticatorFactory.Create(device, credential, AuthenticationProvider.Auto); authenticator.Authenticate(); }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerPaperCutApp"/> class. /// </summary> /// <param name="device">The device.</param> public JediWindjammerPaperCutApp(JediWindjammerDevice device) : base(device.ControlPanel) { _device = device; _controlPanel = device.ControlPanel; }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerTriage"/> class. /// </summary> /// <param name="jediWindjammerDevice">The jedi windjammer device.</param> /// <param name="pluginExecutionData">The plugin execution data.</param> public JediWindjammerTriage(JediWindjammerDevice jediWindjammerDevice, PluginExecutionData pluginExecutionData) : base(pluginExecutionData) { _jediWindjammerDevice = jediWindjammerDevice; _controlPanel = _jediWindjammerDevice.ControlPanel; }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerEquitracApp"/> class. /// </summary> /// <param name="device">The device.</param> public JediWindjammerEquitracApp(JediWindjammerDevice device) : base(device.ControlPanel) { _device = device; _controlPanel = _device.ControlPanel; }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerSafeComApp"/> class. /// </summary> /// <param name="device">The device.</param> public JediWindjammerSafeComApp(JediWindjammerDevice device) : base(device.Snmp, device.ControlPanel) { _controlPanel = device.ControlPanel; _isOmni = false; }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerAutoStoreAuthenticator"/> class. /// </summary> /// <param name="controlPanel">The <see cref="JediWindjammerControlPanel" /> object.</param> /// <param name="credential">The <see cref="AuthenticationCredential" /> object.</param> /// <param name="pacekeeper">The <see cref="Pacekeeper" /> object.</param> public JediWindjammerAutoStoreAuthenticator(JediWindjammerControlPanel controlPanel, AuthenticationCredential credential, Pacekeeper pacekeeper) : base(controlPanel, credential, pacekeeper) { }
public JediWindjammerCopyJobOptionsManager(JediWindjammerDevice device) : base(device, "CopyAppMainForm") { _controlPanel = device.ControlPanel; }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerAppAuthenticatorBase" /> class. /// </summary> /// <param name="controlPanel">The <see cref="JediWindjammerControlPanel"/> object.</param> /// <param name="credential">The <see cref="AuthenticationCredential"/> object.</param> /// <param name="pacekeeper">The <see cref="Pacekeeper"/> object.</param> protected JediWindjammerAppAuthenticatorBase(JediWindjammerControlPanel controlPanel, AuthenticationCredential credential, Pacekeeper pacekeeper) { ControlPanel = controlPanel; Credential = credential; Pacekeeper = pacekeeper; }
/// <summary> /// Creates an <see cref="IAppAuthenticator" /> for the specified <see cref="AuthenticationProvider"/> value. /// </summary> /// <param name="provider">The <see cref="AuthenticationProvider"/> value.</param> /// <param name="controlPanel">The <see cref="JediWindjammerControlPanel"/> object.</param> /// <param name="credential">The <see cref="AuthenticationCredential"/> object.</param> /// <param name="pacekeeper">The <see cref="Pacekeeper"/> object.</param> /// <returns></returns> public static IAppAuthenticator Create(AuthenticationProvider provider, JediWindjammerControlPanel controlPanel, AuthenticationCredential credential, Pacekeeper pacekeeper) { object[] constructorParameters = new object[] { controlPanel, credential, pacekeeper }; return(_instance.FactoryCreate(provider, constructorParameters)); }
/// <summary> /// Initializes a new instance of the <see cref="JediWindjammerBlueprintApp"/> class. /// </summary> /// <param name="device">The device.</param> public JediWindjammerBlueprintApp(JediWindjammerDevice device) : base(device.Snmp, device.ControlPanel) { _device = device; _controlPanel = device.ControlPanel; }