Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public WirelessSecuritySettings(WEPPersonalSettings wepPersonalSettings)
 {
     WirelessAuthentication    = WirelessAuthentications.Wep;
     WirelessConfigurationType = WirelessTypes.Personal;
     WEPPersonalSecurity       = wepPersonalSettings;
 }