Example #1
0
        /// <summary>
        /// Verify screen after Login
        /// <param name="authType">authType for Login</param>
        /// <param name="id">Navigate to destination by FilePath</param>
        /// </summary>
        private void VerifyLogin(KioskAuthType authType, string id)
        {
            if (!JetAdvantageLinkControlHelper.WaitingObjectAppear(new UiSelector().ResourceId($"{KioskPackageName}:id/homeLayout")))
            {
                CheckServerErrorPopup();
                DeviceWorkflowException e = new DeviceWorkflowException($"Home layout after login is not displayed :: {authType}");
                e.Data.Add(_exceptionCategoryData, ConnectorExceptionCategory.SignIn.GetDescription());
                throw e;
            }

            if (authType.Equals(KioskAuthType.Login))
            {
                if (!LinkUI.Controller.GetText(new UiSelector().ResourceId($"{KioskPackageName}:id/userName")).Contains(id))
                {
                    DeviceWorkflowException e = new DeviceWorkflowException($"Displayed ID is wrong: {LinkUI.Controller.GetText(new UiSelector().ResourceId($"{KioskPackageName}:id/userName"))}");
                    e.Data.Add(_exceptionCategoryData, ConnectorExceptionCategory.SignIn.GetDescription());
                    throw e;
                }
            }
            RecordEvent(DeviceWorkflowMarker.AuthenticationEnd);
        }
Example #2
0
        private void authtype_ComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            KioskAuthType authtype = EnumUtil.GetByDescription <KioskAuthType>(authtype_ComboBox.Text);

            switch (authtype)
            {
            case KioskAuthType.Card:
                id_TextBox.Enabled  = false;
                pwd_TextBox.Enabled = false;
                id_Label.Enabled    = false;
                pwd_Label.Enabled   = false;
                break;

            case KioskAuthType.Login:
                id_TextBox.Enabled  = true;
                pwd_TextBox.Enabled = true;
                id_Label.Enabled    = true;
                pwd_Label.Enabled   = true;
                break;
            }
        }