Esempio n. 1
0
        public IWebDriver BuildWebDriver()
        {
            string location = ConfigurationManager.AppSettings["DriverLocation"];

            if (string.IsNullOrEmpty(location))
            {
                throw new Exception("Set up  DriverLocation setting first");
            }
            if (_browserType.Equals(WebBrowser.Chrome))
            {
                return(new ChromeDriver(location));
            }
            else
            {
                return(new FirefoxDriver(location));
            }
        }