/// <summary> /// Checks the device job status by querying Job Status button on control panel /// </summary> /// <returns></returns> protected override bool CheckDeviceJobStatusByControlPanel() { bool ready = false; _controlPanel.PressKey(JediHardKey.Menu); Thread.Sleep(TimeSpan.FromSeconds(1)); _controlPanel.ScrollPressNavigate("mAccessPointDisplay", "Title", "Job Status", "JobStatusMainForm", true); var cp = _controlPanel; var activeJobButtonText = cp.GetProperty("mActiveJobListBox_Item0", "Column1Text"); if (string.IsNullOrEmpty(activeJobButtonText)) { ready = true; } else { // inconclusive, could not find expected button which means unexpected screen may be up ready = false; } return(ready); }
/// <summary> /// Logs in to the Safecom on the device control panel using ID CODE /// </summary> /// <param name="pin">PIN</param> /// <returns></returns> public void AuthenticateSafecom(string pin) { try { var preparationManager = DevicePreparationManagerFactory.Create(_device); preparationManager.WakeDevice(); //Go to Home Screen _controlPanel.PressKey(JediHardKey.Menu); //Enter Credentials _controlPanel.PressToNavigate("b7396880-ec17-11df-98cf-0800200c9a66", "SignInForm", true); _controlPanel.PressToNavigate("m_textBox", "SignInKeyboardForm", true); // SafeCom ID authenticiation uses a unique personal identification code (PIC) that has been assigned to each user. Our convention is that it's the username with the u lopped off // e.g. u00001 => 00001; u00038 => 00038 _controlPanel.TypeOnVirtualKeyboard("mKeyboard", _credential.UserName.Substring(1)); //Enter Username as ID CODE _controlPanel.PressToNavigate("ok", "SignInForm", true); _controlPanel.PressToNavigate("mOkButton", "OxpUIAppMainForm800X300", true); //Sign In } catch (Exception ex) { throw new Exception($"Safecom navigation failed with exception:{ex.Message}"); } }