/// <summary> /// Initialize the Driver to setup several of the static variables and allows you to call browser later. /// </summary> public DriverFactory() { //Settings._assembly Console.Write(" -> Info: Adding 'core' and 'test' assembly reference... "); Settings.AddAssembly("core", Assembly.GetExecutingAssembly()); Settings.AddAssembly("test", Assembly.GetCallingAssembly()); Console.WriteLine("complete"); var useGrid = Regex.IsMatch(Environment.MachineName, "(inttest|svc|appweb)", RegexOptions.IgnoreCase); //To run against DevSelenium, comment out the above useGrid line and uncomment both lines below //UseDevSeleniumHub = true; //var useGrid = true; Settings.isLocal = !useGrid; Settings.runEnv = Settings.GetCurrentEnvironment(); Console.WriteLine(" -> Info: Settings.runEnv = {0}", Settings.runEnv); //Default browser download directory if (Directory.Exists(downloadPath)) { return; } Console.WriteLine(" -> Info: Creating default download folder\n " + downloadPath); Directory.CreateDirectory(downloadPath); }