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; }
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; } }