private bool ConfigureWepPersonal(WirelessSettings wirelessSettings, WEPPersonalSettings wepSettings, ProductType productType = ProductType.None)
        {
            /*
             *      TPS                     VEP-MI                          VEP-SI
             * WEP    WEP Persoanl            WEP Personal, WEP Enterprise    NA
             * WPA    Personal, Enterprise    Personal, Enterprise            Personal, Enterprise
             * WPS    Push, Pin               NA                              NA
             */
            if (_adapter.Settings.ProductType == PrinterFamilies.VEP && productType == ProductType.SingleInterface)
            {
                TraceFactory.Logger.Info("WEP is not supported on VEP-SI.");
                return(false);
            }

            if (_adapter.Settings.ProductType == PrinterFamilies.VEP && wirelessSettings.WirelessMode == WirelessModes.Bgn)
            {
                TraceFactory.Logger.Info("WEP security doesnot not supported on BGN mode on VEP.");
                return(false);
            }

            CoreUtility.Retry.UntilTrue(() => _adapter.IsElementPresent("WirelessSecurity_WEP"), 10, TimeSpan.FromSeconds(5));
            _adapter.Check("WirelessSecurity_WEP");

            if (_adapter.Settings.ProductType == PrinterFamilies.VEP)
            {
                _adapter.SelectByValue("WirelessSecurity_WEPType", WirelessTypes.Personal.ToString().ToUpper());
            }


            if (_adapter.Settings.ProductType == PrinterFamilies.InkJet || _adapter.Settings.ProductType == PrinterFamilies.TPS)
            {
                _adapter.SelectByValue("WirelessSecurity_WEPKeyIndex", CtcUtility.GetEnumvalue(Enum <WEPIndices> .Value(wepSettings.WEPIndex), _adapter.Settings.ProductType));
            }
            else
            {
                _adapter.SelectDropDown("WirelessSecurity_WEPKeyIndex", CtcUtility.GetEnumvalue(Enum <WEPIndices> .Value(wepSettings.WEPIndex), _adapter.Settings.ProductType));
            }

            _adapter.SetText("WirelessSecurity_WEPKey", wepSettings.WEPKey);

            if (_adapter.Settings.ProductType == PrinterFamilies.InkJet)
            {
                _adapter.SetText("WirelessSecurity_WEPKey_Confirm", wepSettings.WEPKey);
            }
            try
            {
                _adapter.Click("Wireless_Apply");
            }
            finally
            { }

            return(true);
        }
        private bool ConfigureEnterpriseWireless(WirelessSettings wirelessSettings, WirelessAuthentications authMode, EnterpriseSecuritySettings securitySettings, ProductType productType = ProductType.None)
        {
            if (authMode == WirelessAuthentications.Wep && productType != ProductType.MultipleInterface)
            {
                TraceFactory.Logger.Info("Enterprise WEP is supported only for VEP-MI");
                return(false);
            }

            if (_adapter.Settings.ProductType == PrinterFamilies.VEP && wirelessSettings.WirelessMode == WirelessModes.Bgn)
            {
                TraceFactory.Logger.Info("WEP security doesnot not suppor on BGN mode on VEP.");
                return(false);
            }

            string securityMode = (authMode == WirelessAuthentications.Wpa) ? "WPA" : "WEP";

            CoreUtility.Retry.UntilTrue(() => _adapter.IsElementPresent("WirelessSecurity_{0}".FormatWith(securityMode)), 20, TimeSpan.FromSeconds(5));
            _adapter.Check("WirelessSecurity_{0}".FormatWith(securityMode));
            _adapter.Check("WirelessSecurity_{0}Enterprise".FormatWith(securityMode));

            _adapter.Uncheck("Wireless_{0}EAPTLS".FormatWith(securityMode));
            _adapter.Uncheck("Wireless_{0}EAPTLS".FormatWith(securityMode));
            _adapter.Uncheck("Wireless_{0}LEAP".FormatWith(securityMode));

            if (securitySettings.EnterpriseConfiguration.AuthenticationProtocol.HasFlag(AuthenticationMode.EAPTLS))
            {
                _adapter.Check("Wireless_{0}EAPTLS".FormatWith(securityMode));
            }

            if (securitySettings.EnterpriseConfiguration.AuthenticationProtocol.HasFlag(AuthenticationMode.PEAP))
            {
                _adapter.Check("Wireless_{0}PEAP".FormatWith(securityMode));
            }

            if (securitySettings.EnterpriseConfiguration.AuthenticationProtocol.HasFlag(AuthenticationMode.LEAP))
            {
                _adapter.Check("Wireless_{0}LEAP".FormatWith(securityMode));
            }

            _adapter.SetText("Wireless_{0}Username".FormatWith(securityMode), securitySettings.EnterpriseConfiguration.UserName);
            _adapter.SetText("Wireless_{0}Password".FormatWith(securityMode), securitySettings.EnterpriseConfiguration.Password);
            _adapter.SetText("Wireless_{0}ConfirmPassword".FormatWith(securityMode), securitySettings.EnterpriseConfiguration.Password);

            if (_adapter.IsElementPresent("Wireless_{0}ReAuthenticate"))
            {
                if (securitySettings.EnterpriseConfiguration.ReAuthenticate)
                {
                    _adapter.Check("Wireless_{0}ReAuthenticate".FormatWith(securityMode));
                }
                else
                {
                    _adapter.Uncheck("Wireless_{0}ReAuthenticate".FormatWith(securityMode));
                }
            }

            if (_adapter.Settings.ProductType == PrinterFamilies.TPS || _adapter.Settings.ProductType == PrinterFamilies.InkJet)
            {
                _adapter.SelectByValue("Wireless_WPAEncryptionStrength", CtcUtility.GetEnumvalue(Enum <EncryptionStrengths> .Value(securitySettings.EnterpriseConfiguration.EncryptionStrength), _adapter.Settings.ProductType));
            }

            try
            {
                _adapter.Click("Wireless_Apply");
            }
            finally
            { }

            return(true);
        }