Example #1
0
        public FirefoxBrowser(IBrowserConfig config)
        {
            Service = new FirefoxServiceMapper(config).Service;
            Options = new FirefoxOptionsMapper(config).Options;

            CreateDriver(config.Host);
        }
Example #2
0
        public InternetExplorerBrowser(IBrowserConfig config)
        {
            Service = new InternetExplorerServiceMapper(config).Service;
            Options = new InternetExplorerOptionsMapper(config).Options;

            CreateDriver(config.Host);
        }
Example #3
0
        public FirefoxServiceMapper(IBrowserConfig config)
        {
            PathToDriverBinary ??= config.PathToDriverBinary;
            HideCommandPrompt = config.HideCommandPrompt;

            CreateService(PathToDriverBinary);
        }
Example #4
0
        public InternetExplorerServiceMapper(IBrowserConfig config)
        {
            PathToDriverBinary = config.PathToDriverBinary ?? PathToDriverBinary;
            HideCommandPrompt  = config.HideCommandPrompt;

            CreateService(PathToDriverBinary);
        }
Example #5
0
        public ChromeBrowser(IBrowserConfig config)
        {
            Service = new ChromeServiceMapper(config).Service;
            Options = new ChromeOptionsMapper(config).Options;

            CreateDriver(config.Host);
        }
Example #6
0
        public InternetExplorerOptionsMapper(IBrowserConfig config)
        {
            PathToBrowserBinary  = config.PathToBrowserExecutable;
            BrowserVersion       = config.Version;
            PlatformName         = config.PlatformName;
            Arguments            = config.Arguments;
            EnableHeadlessMode   = config.Headless;
            AcceptsInsecureCerts = config.AcceptsInsecureCerts;

            SetCapabilities(config.Capabilities);
        }
Example #7
0
        public static void SetConfig(string configPath)
        {
            _config = new CurrentConfig(GetConfig.UseJsonFile(configPath)
                                        .UseTypeParser(new DictionaryParser())
                                        .Build());

            Site    = _config.Site;
            Browser = _config.Browser;
            Pages   = _config.Pages;

            if (_config.Login == null)
            {
                return;
            }

            Login = _config.Login;
        }
Example #8
0
 public static void UseBrowser(IBrowserConfig browserConfig) => Browser = browserConfig;
Example #9
0
 public static void UseBrowser(string browserId) => Browser = _config.SetBrowserConfig(browserId).Browser;