public ConfigSettings() { runTimeSettings = new RuntimeSettings(); reportSettings = new ReportSettings(); httpProxy = new HttpProxy(); appiumSettings = new AppiumSettings(); imageCompareSettings = new ImageCompareSettings(); purpleSettings = new PurpleSettings(); browserStackSettings = new BrowserStackSettings(); }
private static void RegisterDeviceSettings(ILogger logger, string prefix, IServiceCollection services) { var runtimeSettingsUtilities = new RuntimeSettings(logger); var paths = runtimeSettingsUtilities.CalculatePathsOfSettingsFiles(prefix, Path.Combine(Directory.GetCurrentDirectory(), "Runtime"), "DeviceSettings", "common-desktop-selenium.json"); var configurationRoot = runtimeSettingsUtilities.BuildConfiguration(prefix, paths); var platformName = configurationRoot.GetSection("platformName")?.Value?.ToUpper(); switch (platformName) { case "DESKTOP": var instance = new DesktopSettings(); instance.PlatformName = platformName; services.AddSingleton(instance); services.AddSingleton <IDeviceProperties>(instance); break; case "ANDROID": var androidSettings = new AppiumSettings(); configurationRoot.Bind(androidSettings); androidSettings = SubstituteEnvironmentVariables(androidSettings); androidSettings.PlatformName = platformName; androidSettings.Cleanse(); services.AddSingleton(androidSettings); services.AddSingleton <IDeviceProperties>(androidSettings); break; default: throw new ArgumentOutOfRangeException($"The device called {platformName} is currently not supported. "); } }
public ConfigSettings() { runTimeSettings = new RuntimeSettings(); reportSettings = new ReportSettings(); httpProxy = new HttpProxy(); appiumSettings = new AppiumSettings(); imageCompareSettings = new ImageCompareSettings(); purpleSettings = new PurpleSettings(); browserStackSettings = new BrowserStackSettings(); }
public ConfigurationSettings() { RuntimeSettings = new RuntimeSettings(); BrowserStackSettings = new BrowserStackSettings(); AppiumSettings = new AppiumSettings(); }