Пример #1
0
        public IWebDriver InitDriver(IWebDriver driver, Iconfig Config)
        {
            Console.WriteLine("upali");
            Console.WriteLine("Inside InitDriver");
            Console.WriteLine("browser type:" + Config.GetBrowser());

            switch (Config.GetBrowser())
            {
            case BrowserType.Firefox:
                driver = GetFirefoxDriver();
                break;

            case BrowserType.Chrome:
                //  driver = GetChromeDriver();
                ChromeOptions chromeOptions = new ChromeOptions();
                chromeOptions.AddArgument("--start-maximized");
                driver = new ChromeDriver(chromeOptions);
                break;

            case BrowserType.ChromeForCEF:
                driver = GetChromeDriverForCEFApp(Config.GetCEFAppPath());
                break;

            case BrowserType.IExplorer:
                driver = GetIEDriver();
                break;

            default:
                throw new NoDriverFound("Driver not found : " + Config.GetBrowser().ToString());
            }
            return(driver);
        }
Пример #2
0
        public IWebDriver InitDriver(IWebDriver driver, Iconfig config)
        {
            switch (config.GetBrowser())
            {
            case BrowserType.Firefox:
                driver = GetFirefoxDriver();
                break;

            case BrowserType.Chrome:
                driver = GetChromeDriver();
                break;

            case BrowserType.iChrome:
                driver = GetIncognitoChromeDriver();
                break;

            case BrowserType.IExplorer:
                driver = GetIEDriver();
                break;

            default:
                throw new NoDriverFound("Driver not found : " + config.GetBrowser());
            }
            return(driver);
        }
Пример #3
0
        public IWebDriver InitDriver(IWebDriver driver, Iconfig Config)
        {
            Console.WriteLine("upali");
            Console.WriteLine("Inside InitDriver");
            Console.WriteLine("browser type:" + Config.GetBrowser());

            switch (Config.GetBrowser())
            {
            case BrowserType.Firefox:
                driver = GetFirefoxDriver();
                break;

            case BrowserType.Chrome:
                driver = GetChromeDriver();
                break;

            case BrowserType.IExplorer:
                driver = GetIEDriver();
                break;

            default:
                throw new NoDriverFound("Driver not found : " + Config.GetBrowser().ToString());
            }
            return(driver);
        }