Exemple #1
0
        public static void OpenNewBrowser(String URL, BrowserType.Browser type)
        {
            IWebDriver webDriver = null;

            ChoseDriver(ref webDriver, type);
            webDriver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5000));
            webDriver.Navigate().GoToUrl(URL);
            Sincronize.Wait(3200);
            mDriver = webDriver;
        }
        public static void OpenNewBroser(String URL, BrowserType.Browser type)
        {
            IWebDriver webDriver = null;

            ChoseDriver(ref webDriver, type);
            webDriver.Navigate().GoToUrl("http://www.pushmodelslocal.ro:8081/arizona-promo-models.php");
            webDriver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5000));
            webDriver.Navigate().GoToUrl(URL);
            Sincronize.Wait(3200);
            mDriver = webDriver;
        }
Exemple #3
0
        private static void ChoseDriver(ref IWebDriver webDriver, BrowserType.Browser type)
        {
            switch (type)
            {
            case BrowserType.Browser.Chrome:
                webDriver = new ChromeDriver();
                break;

            case BrowserType.Browser.Edge:
                webDriver = new EdgeDriver();
                break;

            case BrowserType.Browser.InternetExplorer:
                webDriver = new InternetExplorerDriver();
                break;

            default:
                webDriver = new FirefoxDriver();
                break;
            }
        }