public WebHostDriver(string browserName)
{
switch (browserName)
{
case "Internet Explorer":
Value = new InternetExplorerDriver();
break;
case "Mozilla Firefox":
FirefoxProfile profile = new FirefoxProfile();
profile.SetPreference("network.automatic-ntlm-auth.trusted-uris", "localhost");
Value = new FirefoxDriver(profile);
break;
case "Google Chrome":
Value = new ChromeDriver();
break;
case "PhantomJS":
Value = new PhantomJSDriver();
break;
default:
throw new ArgumentException(string.Format("Browser '{0}' not supported.", browserName));
}
Value.Manage().Window.Maximize();
Value.Manage().Timeouts().ImplicitlyWait(new TimeSpan(0, 0, MaximumWaitInSecondsWhenFindingPageContent));
}