public IWebDriver GetTestBrowser()
        {
            RunEnv env = EnumHelper.GetRunEnv(TestConfigurationManager.GetInstance().GetRunOn());

            ITestBrowserFactory browserFactory;

            switch (env)
            {
            case RunEnv.LOCAL:
                browserFactory = new LocalTestBrowser();
                break;

            case RunEnv.BUILDSERVER:
                browserFactory = new BuildServerTestBrowser();
                break;

            case RunEnv.CLOUD:
                browserFactory = new CloudTestBrowser();
                break;

            default:
                return(null);
            }

            return(browserFactory.Create());
        }
Exemple #2
0
        public IWebDriver Create()
        {
            //BrowserType type = BrowserType.GetBrowserType(TestConfigurationManager.GetInstance().GetTestBrowser());
            string type = TestConfigurationManager.GetInstance().GetTestBrowser();


            if (type == "chrome")
            {
                return(new ChromeDriver());
            }
            return(null);

            //switch (type)
            //{
            //    case CHROME:
            //         return new ChromeDriver();
            //    case FIREFOX:
            //        return new FirefoxDriver();
            //    case IEXPLORER:
            //        return new InternetExplorerDriver();
            //    case SAFARI:
            //        return new SafariDriver();
            //    default:
            //        return null;

            //}
        }
        public IWebDriver Create()
        {
            string type = TestConfigurationManager.GetInstance().GetTestBrowser();

            if (type == "chrome")
            {
                return(new ChromeDriver());
            }
            return(null);
        }