示例#1
0
        public static Uri GetServerUri()
        {
            var bundler     = new ConfigBundler().Bundle(Servers);
            var serverValue = bundler.Get <string>(TargetServer);

            return(new Uri(serverValue));
        }
示例#2
0
        private static DesiredCapabilities BundleCapabilities(Platform platform, string deviceKey)
        {
            var configBundler = new ConfigBundler();

            configBundler.Bundle(Capabilities)
            .Bundle(platform == Platform.Android ? AndroidCapabilities : IosCapabilities)
            .Bundle(GetDeviceCapabilities(platform, deviceKey));
            var configs      = configBundler.GetConfigs();
            var capabilities = new DesiredCapabilities(configs as Dictionary <string, object>);

            return(capabilities);
        }
示例#3
0
        public static void SetLogPaths(string workingDir)
        {
            WorkingDir = workingDir;
            var logBundler = new ConfigBundler().Bundle(Log);

            LogPath        = workingDir + logBundler.Get <string>(RelativeLogPath);
            ScreenshotPath = workingDir + logBundler.Get <string>(RelativeScreenshotPath);

            // added check if exists for backwards compatitibilty
            if (!Directory.Exists(LogPath))
            {
                Directory.CreateDirectory(LogPath);
            }

            if (!Directory.Exists(ScreenshotPath))
            {
                Directory.CreateDirectory(ScreenshotPath);
            }
        }