Пример #1
0
        private ChromeDriver GetModifiedChromeDriver(String browserMobPath, String domain, String username, String password)
        {
            BasicAuthSettings.Server = new Server(browserMobPath);
            BasicAuthSettings.Server.Start();
            Proxy seleniumProxy = SetUpProxy(domain, username, password).Result;

            ChromeOptions opts = new ChromeOptions();

            opts.Proxy = seleniumProxy;
            return(BasicAuthDriverRetriever.GetChromeDriver(opts));
        }
Пример #2
0
        private FirefoxDriver GetModifiedFirefoxDriver(String browserMobPath, String domain, String username, String password)
        {
            FirefoxProfile prof = new FirefoxProfile();

            BasicAuthSettings.Server = new Server(browserMobPath);
            BasicAuthSettings.Server.Start();

            Proxy seleniumProxy = SetUpProxy(domain, username, password).Result;

            prof.SetProxyPreferences(seleniumProxy);

            return(BasicAuthDriverRetriever.GetFirefoxDriver(prof));
        }