private static List <DriverInfo> GetServices(string platformType) { List <DriverInfo> PlatformServices = new List <DriverInfo>(); ObservableList <PluginPackage> Plugins = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <PluginPackage>(); string PlatformInterface = string.Empty; ePlatformType mplatformType = ePlatformType.NA; Enum.TryParse(platformType, true, out mplatformType); switch (mplatformType) { case ePlatformType.Web: PlatformInterface = "IWebPlatform"; break; case ePlatformType.WebServices: PlatformInterface = "IWebServicePlatform"; break; } if (!string.IsNullOrEmpty(PlatformInterface)) { foreach (PluginPackage plugin in Plugins) //.Where(x => x.Services!=null && x.Services.Any(a=>a.Interfaces.Contains("IWebPlatform")))) { DriverInfo DI = new DriverInfo(plugin.PluginPackageInfo.Id, true); foreach (PluginServiceInfo PI in plugin.Services.Where(a => a.Interfaces.Contains(PlatformInterface))) { DI.services.Add(PI.ServiceId); } if (DI.services.Count > 0) { PlatformServices.Add(DI); } } } return(PlatformServices); }
private static List <DriverInfo> GetServices(ePlatformType platformType) { List <DriverInfo> PlatformServices = new List <DriverInfo>(); ObservableList <PluginPackage> Plugins = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <PluginPackage>(); string PlatformInterface = string.Empty; switch (platformType) { case ePlatformType.Web: PlatformInterface = "IWebPlatform"; break; case ePlatformType.WebServices: PlatformInterface = "IWebServicePlatform"; break; } if (!string.IsNullOrEmpty(PlatformInterface)) { foreach (PluginPackage plugin in Plugins) { plugin.PluginPackageOperations = new PluginPackageOperations(plugin); DriverInfo DI = new DriverInfo(((PluginPackageOperations)plugin.PluginPackageOperations).PluginPackageInfo.Id, true); foreach (PluginServiceInfo PI in ((PluginPackageOperations)plugin.PluginPackageOperations).Services.Where(a => a.Interfaces.Contains(PlatformInterface))) { DI.services.Add(PI.ServiceId); } if (DI.services.Count > 0) { PlatformServices.Add(DI); } } } return(PlatformServices); }
private static List <DriverInfo> GetServices(string platformType) { List <DriverInfo> PlatformServices = new List <DriverInfo>(); ObservableList <PluginPackage> Plugins = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <PluginPackage>(); if (platformType == ePlatformType.Web.ToString()) { foreach (PluginPackage plugin in Plugins) //.Where(x => x.Services!=null && x.Services.Any(a=>a.Interfaces.Contains("IWebPlatform")))) { DriverInfo DI = new DriverInfo(plugin.PluginPackageInfo.Id, true); foreach (PluginServiceInfo PI in plugin.Services.Where(a => a.Interfaces.Contains("IWebPlatform"))) { DI.services.Add(PI.ServiceId); } if (DI.services.Count > 0) { PlatformServices.Add(DI); } } } return(PlatformServices); }
private static DriverInfo GetDriver(ePlatformType platformType) { DriverInfo DI = new DriverInfo(platformType + " Driver"); if (platformType == ePlatformType.Web) { DI.services.Add(Agent.eDriverType.InternalBrowser); DI.services.Add(Agent.eDriverType.SeleniumChrome); DI.services.Add(Agent.eDriverType.SeleniumFireFox); DI.services.Add(Agent.eDriverType.SeleniumIE); DI.services.Add(Agent.eDriverType.SeleniumRemoteWebDriver); DI.services.Add(Agent.eDriverType.SeleniumEdge); } else if (platformType == ePlatformType.Java) { DI.services.Add(Agent.eDriverType.JavaDriver); } else if (platformType == ePlatformType.Mobile) { DI.services.Add(Agent.eDriverType.MobileAppiumAndroid); DI.services.Add(Agent.eDriverType.MobileAppiumIOS); DI.services.Add(Agent.eDriverType.PerfectoMobileAndroid); DI.services.Add(Agent.eDriverType.PerfectoMobileAndroidWeb); DI.services.Add(Agent.eDriverType.PerfectoMobileIOS); DI.services.Add(Agent.eDriverType.PerfectoMobileIOSWeb); DI.services.Add(Agent.eDriverType.MobileAppiumAndroidBrowser); DI.services.Add(Agent.eDriverType.MobileAppiumIOSBrowser); } else if (platformType == ePlatformType.Windows) { DI.services.Add(Agent.eDriverType.WindowsAutomation); } else if (platformType == ePlatformType.PowerBuilder) { DI.services.Add(Agent.eDriverType.PowerBuilder); } else if (platformType == ePlatformType.Unix) { DI.services.Add(Agent.eDriverType.UnixShell); } else if (platformType == ePlatformType.DOS) { DI.services.Add(Agent.eDriverType.DOSConsole); } else if (platformType == ePlatformType.WebServices) { DI.services.Add(Agent.eDriverType.WebServices); } //else if (platformType == ePlatformType.AndroidDevice.ToString()) //{ // DI.services.Add(Agent.eDriverType.AndroidADB); //} else if (platformType == ePlatformType.ASCF) { DI.services.Add(Agent.eDriverType.ASCF); } else if (platformType == ePlatformType.MainFrame) { DI.services.Add(Agent.eDriverType.MainFrame3270); } else { DI = null; } return(DI); }