Exemple #1
0
        /// <summary>
        /// Launch with copy
        /// <param name="jobType">JobType</param>
        /// <param name="option">Options for copy</param>
        /// </summary>
        public void Launch(KioskJobType jobType, KioskCopyOptions option)
        {
            bool result = false;

            UpdateStatus($"Launch start: {jobType.GetDescription()}");

            result = LinkUI.Controller.Click(new UiSelector().ResourceId($"{KioskPackageName}:id/homeCopyButton"));

            if (result)
            {
                VerifyLaunch(jobType, new UiSelector().ResourceId($"{KioskPackageName}:id/start_tab"));
            }
            else
            {
                DeviceWorkflowException e = new DeviceWorkflowException($"Launch failed: Clicking copy object is failed: {jobType.GetDescription()}");
                e.Data.Add(_exceptionCategoryData, ConnectorExceptionCategory.AppLaunch.GetDescription());
                throw e;
            }
        }
Exemple #2
0
        /// <summary>
        /// Launch with scan
        /// <param name="jobType">JobType</param>
        /// <param name="option">Options for scan</param>
        /// </summary>
        public void Launch(KioskJobType jobType, KioskScanOptions option)
        {
            bool result = false;

            UpdateStatus($"Launch start: {jobType.GetDescription()}");

            result = LinkUI.Controller.Click(new UiSelector().ResourceId($"{KioskPackageName}:id/homeScanButton"));

            if (result)
            {
                switch (option.ScanDestination)
                {
                case KioskScanDestination.USB:
                    result = LinkUI.Controller.Click(new UiSelector().ResourceId($"{KioskPackageName}:id/scan_main_usb_btn"));
                    break;

                case KioskScanDestination.Email:
                    result = LinkUI.Controller.Click(new UiSelector().ResourceId($"{KioskPackageName}:id/scan_main_email_btn"));
                    break;

                default:
                    UpdateStatus($"Scan destination is invalid: {option.ScanDestination.GetDescription()}");
                    result = false;
                    break;
                }
            }

            if (result)
            {
                VerifyLaunch(jobType, new UiSelector().ResourceId($"{KioskPackageName}:id/start_tab"));
            }
            else
            {
                DeviceWorkflowException e = new DeviceWorkflowException($"Launch failed: Selecting scan destination is failed: {option.ScanDestination.GetDescription()}");
                e.Data.Add(_exceptionCategoryData, ConnectorExceptionCategory.AppLaunch.GetDescription());
                throw e;
            }
        }
Exemple #3
0
 /// <summary>
 /// Verify screen after Launch
 /// <param name="jobType">JobType: Copy, Print, Scan</param>
 /// </summary>
 private void VerifyLaunch(KioskJobType jobType, string waitingObject)
 {
     if (!JetAdvantageLinkControlHelper.WaitingObjectAppear(waitingObject))
     {
         CheckServerErrorPopup();
         DeviceWorkflowException e = new DeviceWorkflowException($"Launch failed: {jobType.GetDescription()} - It has no Price per page object");
         e.Data.Add(_exceptionCategoryData, ConnectorExceptionCategory.AppLaunch.GetDescription());
         throw e;
     }
     RecordEvent(DeviceWorkflowMarker.AppShown);
 }
Exemple #4
0
 /// <summary>
 /// Verify screen after Launch
 /// <param name="jobType">JobType: Copy, Print, Scan</param>
 /// </summary>
 private void VerifyLaunch(KioskJobType jobType)
 {
     if (!JetAdvantageLinkControlHelper.WaitingObjectAppear(new UiSelector().ResourceId($"{KioskPackageName}:id/ll_price_per_page")))
     {
         CheckServerErrorPopup();
         DeviceWorkflowException e = new DeviceWorkflowException($"Launch failed: {jobType.GetDescription()} - It has no Price per page object");
         e.Data.Add(_exceptionCategoryData, ConnectorExceptionCategory.AppLaunch.GetDescription());
         throw e;
     }
     RecordEvent(DeviceWorkflowMarker.AppShown);
 }