public void Setup() { statuScenario = new LogStatus(); if (contadorExtentResports == 0) { ExtentReport.CreateFileLog(); contadorExtentResports += 1; } else { contadorExtentResports += 1; } ExecuteCMD("taskkill /im chromedriver.exe /f /t"); ExecuteCMD("taskkill /im chrome.exe /f /t"); webDriver = new ChromeDriver(AppDomain.CurrentDomain.BaseDirectory); driver = new EventFiringWebDriver(webDriver); driver.ElementClicking += DriverElementClicking; driver.ElementClicked += DriverElementClicked; driver.ElementValueChanging += DriverElementValueChanging; driver.ElementValueChanged += DriverElementValueChanged; action = new Actions(driver); driver.Navigate().GoToUrl(Url); driver.Manage().Window.Maximize(); action = new Actions(driver); }
protected override void StartInstance() { var driver = new OpenQA.Selenium.Chrome.ChromeDriver(@"..\..\..\chromedriver\"); m_driver = new EventFiringWebDriver(driver); m_driver.Manage().Window.Maximize(); }
public void Initialize(BrowserType browser) { Browser = browser; ChromeOptions chromeOptions = new ChromeOptions(); switch (Browser) { case BrowserType.Chrome: //ChromeOptions chromeOptions = new ChromeOptions(); chromeOptions.SetLoggingPreference(LogType.Browser, LogLevel.All); chromeOptions.AddArgument("--disable-notifications"); _webDriver = new ChromeDriver(chromeOptions); WebDriverEventFiring(); break; case BrowserType.Firefox: FirefoxOptions options = new FirefoxOptions(); options.SetLoggingPreference(LogType.Browser, LogLevel.All); _webDriver = new FirefoxDriver(); WebDriverEventFiring(); break; case BrowserType.MobileEmulator: chromeOptions.EnableMobileEmulation("iPhone 6"); _webDriver = new ChromeDriver(chromeOptions); WebDriverEventFiring(); break; } if (Browser != BrowserType.MobileChrome) { driver.Manage().Window.Maximize(); driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(30); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); } else { driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(50); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(50); } //BaseURL = "http://localhost:8080/web/home.html"; BaseURL = "http://localhost:2122/web/home.html"; }
public void Start() { driver = new EventFiringWebDriver(new ChromeDriver()); driver.FindingElement += (sender, e) => Console.WriteLine(e.FindMethod); driver.FindElementCompleted += (sender, e) => Console.WriteLine(e.FindMethod + " found"); driver.ExceptionThrown += (sender, e) => Console.WriteLine(e.ThrownException); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); }
public Edge SetupEdge() { _options = new EdgeOptions(); _options.AddAdditionalCapability("window", "--start-maximized"); var firingDriver = new EventFiringWebDriver(new EdgeDriver(_options)); firingDriver .Manage() .Timeouts() .ImplicitWait = (TimeSpan.FromSeconds(ImplicitTimeWaitInSeconds)); firingDriver .Manage() .Timeouts() .PageLoad = (TimeSpan.FromSeconds(PageLoadTimeoutInSeconds)); _driver = firingDriver; return(this); }
public void Start() { _driver = new EventFiringWebDriver(new ChromeDriver()); _driver.FindingElement += (sender, e) => Console.WriteLine("try to find: " + e.FindMethod); _driver.FindElementCompleted += (sender, e) => Console.WriteLine(e.FindMethod + " found"); _driver.ExceptionThrown += OnDriverOnExceptionThrown; _driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10)); _wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(_waitDefaultTime)); }
public static IWebDriver CreateDriver() { var service = ChromeDriverService.CreateDefaultService(); var chromeDriver = new ChromeDriver(service); var driver = new EventFiringWebDriver(chromeDriver); driver.Manage().Window.Maximize(); return(driver); }
private void Button_Click(object sender, RoutedEventArgs e) { DriverControl dc = new DriverControl(); EventFiringWebDriver eventDriver = dc.GetDriver(); // 드라이버 객체 생성 및 클릭 이벤트 세팅 eventDriver.Navigate().GoToUrl("https://spib.wooribank.com/pib/Dream?withyou=CMLGN0001"); Thread.Sleep(1000); Thread.Sleep(1000); BringToFront(); MessageBox.Show("로그인 해주세요."); Thread.Sleep(1000); // 로그인 될때까지 대기 while (true) { try { if (eventDriver.FindElement(By.CssSelector(".login-name")).Displayed) { System.Console.WriteLine("로그인 성공"); break; } } catch (Exception) { //Console.WriteLine($": '{e}'"); } Thread.Sleep(2000); } blindDriver = dc.GetDriver(new String[] { "--headless", "window-size=1920x1080", "disable-gpu", "user - agent = Mozilla / 5.0(Macintosh; Intel Mac OS X 10_12_6) AppleWebKit / 537.36(KHTML, like Gecko) Chrome / 61.0.3163.100 Safari / 537.36", "lang =ko_KR" }); // blindDriver = dc.GetDriver(); blindDriver.Navigate().GoToUrl("https://www.wooribank.com/"); ReadOnlyCollection <Cookie> _cookies = eventDriver.Manage().Cookies.AllCookies; eventDriver.ExecuteScript("$('body').append('<div id=\"k-shield\" style=\"position: fixed; color: white; width: 100%;height: 100%;background: rgba(255, 0, 0, 0.6);top: 0;text-align: center; padding-top:250px; font-size: 30px; font-weight: bold; z-index: 1000;\" >기다려주세요</div>');"); foreach (Cookie item in _cookies) { blindDriver.Manage().Cookies.AddCookie(item); } Thread.Sleep(1000); blindDriver.Navigate().GoToUrl("https://spib.wooribank.com/pib/Dream?withyou=PSINQ0013"); // 게좌 화면 Thread.Sleep(1000); eventDriver.Quit(); AccountList.ItemsSource = dc.SetAccountList(blindDriver); BringToFront(); MessageBox.Show("계좌를 클릭해주세요."); }
private ApplicationManager() { //driver = new ChromeDriver(); //driver = new InternetExplorerDriver(); //IWebDriver driver = new RemoteWebDriver(new Uri("http://*****:*****@"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"; options.AddArgument("start-maximized"); options.SetLoggingPreference(LogType.Browser, LogLevel.All); driver = new EventFiringWebDriver(new ChromeDriver(options)); driver.FindingElement += (sender, e) => Console.WriteLine(e.FindMethod); driver.FindElementCompleted += (sender, e) => Console.WriteLine(e.FindMethod + " found"); driver.ExceptionThrown += (sender, e) => Console.WriteLine(e.ThrownException); //InternetExplorerOptions options = new InternetExplorerOptions(); //options.RequireWindowFocus = true; //driver = new InternetExplorerDriver(options); // new schema: //IWebDriver driver = new FirefoxDriver(); // new schema more clearly: //FirefoxOptions options = new FirefoxOptions(); //options.UseLegacyImplementation = false; //driver = new FirefoxDriver(options); // old schema: //FirefoxOptions options = new FirefoxOptions(); //options.UseLegacyImplementation = true; //driver = new FirefoxDriver(options); //Nightly //FirefoxOptions options = new FirefoxOptions(); //options.BrowserExecutableLocation = @"c:\Program Files (x86)\Firefox Developer Edition\firefox.exe"; //driver = new FirefoxDriver(options); //FirefoxBinary binary = new FirefoxBinary(@"c:\Program Files (x86)\Firefox Developer Edition\firefox.exe"); //driver = new FirefoxDriver(binary, new FirefoxProfile()); //driver = new FirefoxDriver(); //FirefoxProfile profile = new FirefoxProfile(); driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10)); baseURL = "http://localhost:8080/litecart/admin"; loginHelper = new LoginHelper(this); navigator = new NavigationHelper(this, baseURL); productpageHelper = new ProductPageHelper(this); ducksHelper = new DucksHelper(this); checkoutHelper = new CheckoutHelper(this); }
/// <summary> /// Setup Chrome with options /// </summary> /// <returns>this class instance</returns> public Chrome SetupChromeWithOption() { foreach (var opt in _chromeOptions) { _options.AddArguments(opt); } var firingDriver = new EventFiringWebDriver(new ChromeDriver(_options)); firingDriver.ExceptionThrown += firingDriver_TakeScreenshotOnException; firingDriver .Manage() .Timeouts() .ImplicitWait = (TimeSpan.FromSeconds(ImplicitTimeWaitInSeconds)); firingDriver .Manage() .Timeouts() .PageLoad = (TimeSpan.FromSeconds(PageLoadTimeoutInSeconds)); _driver = firingDriver; return(this); }
public static void Initialize() { Instance = new EventFiringWebDriver(new ChromeDriver()); //log events Instance.FindingElement += (sender, e) => Console.WriteLine(e.FindMethod); Instance.FindElementCompleted += (sender, e) => Console.WriteLine(e.FindMethod + " found"); Instance.ExceptionThrown += (sender, e) => Console.WriteLine(e.ThrownException); //TO DO: Refactor find a way to capture data entered (helpful if parameterized by fake (random) data generator) Instance.ElementValueChanged += (sender, e) => Console.WriteLine("ElementValueChanged: " + e.Element.GetAttribute("textContent")); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10)); }
public void SetUp() { driver = new EventFiringWebDriver(new ChromeDriver()); //driver.FindingElement - СОБЫТИЕ, которое генерируется ПЕРЕД началом поиска элемента. //args.FindMethod - выводит ЛОКАТОР, но есть методы для вывода ДРАЙВЕРА, который выполнял поиск - args.Driver и элемента ОТ КОТОРОГО выполнялся поиск driver.FindingElement += (sender, args) => Console.WriteLine(args.FindMethod); //driver.FindElementCompleted - событие, которое происходит тогда, когда элемент находится методом FindElement(s) driver.FindElementCompleted += (sender, args) => Console.WriteLine(string.Concat(args.FindMethod, " was found")); // driver.ExceptionThrown - событие, которое происходит тогда, когда выбрасывается ИСКЛЮЧЕНИЕ. args.ThrownException, args.Driver driver.ExceptionThrown += (sender, args) => Console.WriteLine(args.ThrownException); driver.Manage().Window.Maximize(); //driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); }
private ApplicationManager() { ChromeOptions options = new ChromeOptions(); options.AddArgument("start-maximized"); options.SetLoggingPreference(LogType.Browser, LogLevel.Severe); options.SetLoggingPreference(LogType.Browser, LogLevel.Warning); //options.SetLoggingPreference(LogType.Client, LogLevel.All); //options.SetLoggingPreference(LogType.Browser, LogLevel.All); Driver = new EventFiringWebDriver(new ChromeDriver(options)); //Console.WriteLine(((IHasCapabilities)Driver).Capabilities); Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(1.5); Wait = new WebDriverWait(Driver, TimeSpan.FromSeconds(10)); Driver.Manage().Cookies.DeleteAllCookies(); //Driver.FindElementCompleted += (sender, e) => Console.WriteLine($"Element '{e.FindMethod}' found."); //Driver.ElementClicking += (sender, e) => Console.WriteLine($"Clicking on element '{e.Element}'..."); //Driver.ElementClicked += (sender, e) => Console.WriteLine($"Element '{e.Element}' clicked."); //Driver.ExceptionThrown += (sender, e) => Console.WriteLine(e.ThrownException); //Driver.Navigating += (sender, e) => Console.WriteLine($"Navigating to url '{e.Url}'..."); //Driver.Navigated += (sender, e) => Console.WriteLine($"Url '{e.Url}' opened."); //Driver.ElementValueChanging += (sender, e) => Console.WriteLine($"Changing value in element '{e.Value}'..."); //Driver.ElementValueChanged += (sender, e) => Console.WriteLine($"Value '{e.Element.GetAttribute(e.Value)}' in '{e.Element}' changed."); Auth = new LoginHelper(this); Navigator = new NavigationHelper(this, BaseURL); LeftMenu = new LeftMenuHelper(this); ProductCard = new ProductCardHelper(this); Countries = new CountryHelper(this); Zones = new ZoneHelper(this); Reg = new RegistrationHelper(this); Customer = new CustomerHelper(this); Products = new ProductHelper(this); Cart = new CartHelper(this); Window = new WindowHelper(this); }
public void InitializeChromeDriver() { ChromeOptions options = new ChromeOptions(); //options.AddArgument("disable-infobars"); //options.AddArgument("--start-fullscreen"); options.AddArgument("--headless"); options.AddArgument("--window-size=1280x1024"); //options.AddArgument("--disable-gpu"); driver = new EventFiringWebDriver(new ChromeDriver(options)); driver.ExceptionThrown += firingDriver_TakeScreenshotOnException; driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); }
public SeleniumHelper() { var options = new ChromeOptions(); options.AddArgument("--disable-extensions"); options.AddArgument("--no-sandbox"); options.LeaveBrowserRunning = false; _eventFiringWebDriver = new EventFiringWebDriver (new ChromeDriver(options)); _eventFiringWebDriver.Manage().Window.Maximize(); Selenium = _eventFiringWebDriver; Selenium.Manage().Timeouts().AsynchronousJavaScript = _defaultTimeoutScript; }
private void Start() { EventFiringWebDriver driver = new EventFiringWebDriver(new ChromeDriver()); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(1); GoToCatalog(driver); _driver = driver; var userNameField = _driver.FindElement(By.Name("username")); userNameField.SendKeys("admin"); var passwordField = _driver.FindElement(By.Name("password")); passwordField.SendKeys("admin"); var loginButton = _driver.FindElement(By.TagName("button")); loginButton.Click(); browserLogs = new List <string>(); }
public static void init(Browser browser) { switch (browser) { case Browser.IECleanSessionIgnoreProtectedMode: IEoptions = new InternetExplorerOptions(); IEoptions.EnablePersistentHover = true; IEoptions.EnsureCleanSession = true; IEoptions.IntroduceInstabilityByIgnoringProtectedModeSettings = true; Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.45\32bits", IEoptions); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.RemoteQALaptop: IEoptions = new InternetExplorerOptions(); IEoptions.EnablePersistentHover = true; IEoptions.EnableNativeEvents = false; // string localIp = MyUtils.GetLocalIpAddress(); Instance = new RemoteWebDriver(new Uri("http://" + MyUtils.GetLocalIpAddress() + ":4444/wd/hub"), IEoptions.ToCapabilities()); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.RemoteSofianesIECleanSession: IEoptions = new InternetExplorerOptions(); IEoptions.EnablePersistentHover = true; // IEoptions.EnsureCleanSession = true; IEoptions.EnableNativeEvents = false; Instance = new RemoteWebDriver(new Uri("http://10.220.68.64:4444/wd/hub"), IEoptions.ToCapabilities()); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IECleanSessionNoNativeEvents: IEoptions = new InternetExplorerOptions(); IEoptions.EnablePersistentHover = true; IEoptions.EnsureCleanSession = true; IEoptions.EnableNativeEvents = false; Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.45\32bits", IEoptions); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(30)); Instance.Manage().Window.Maximize(); break; case Browser.IECleanSession: IEoptions = new InternetExplorerOptions(); // IEoptions.EnablePersistentHover = false; // IEoptions.EnableNativeEvents = false; // IEoptions.EnsureCleanSession = true; IEoptions.RequireWindowFocus = true; Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.45\32bits", IEoptions); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(35)); Instance.Manage().Window.Maximize(); break; case Browser.ServerRemote: IEoptions = new InternetExplorerOptions(); IEoptions.EnablePersistentHover = true; IEoptions.EnableNativeEvents = false; Instance = new RemoteWebDriver(new Uri("http://172.18.58.20:4444/wd/hub"), IEoptions.ToCapabilities()); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.RemoteDavidIEDriver2: IEoptions = new InternetExplorerOptions(); IEoptions.EnablePersistentHover = true; Instance2 = new RemoteWebDriver(new Uri("http://172.18.58.26:4444/wd/hub"), IEoptions.ToCapabilities()); FiringDriver2 = new EventFiringWebDriver(Instance2); FiringDriver2.ExceptionThrown += TakeScreenShotOnException; Instance2 = FiringDriver2; FiringDriver2.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); FiringDriver2.Manage().Window.Maximize(); break; case Browser.IE: IEoptions = new InternetExplorerOptions(); // IEoptions.EnablePersistentHover = true; // IEoptions.EnsureCleanSession = true; // IEoptions.IgnoreZoomLevel = true; IEoptions.RequireWindowFocus = true; Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.45\32bits", IEoptions); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.RemoteDavidIENoNativeEvents: IEoptions = new InternetExplorerOptions(); IEoptions.EnablePersistentHover = true; IEoptions.EnableNativeEvents = false; Instance = new RemoteWebDriver(new Uri("http://" + MyUtils.GetLocalIpAddress() + ":4444/wd/hub"), IEoptions.ToCapabilities()); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.RemoteDavidIE: IEoptions = new InternetExplorerOptions(); IEoptions.EnablePersistentHover = true; Instance = new RemoteWebDriver(new Uri("http://" + MyUtils.GetLocalIpAddress() + ":4444/wd/hub"), IEoptions.ToCapabilities()); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.RemoteSofianesIE: IEoptions = new InternetExplorerOptions(); IEoptions.EnablePersistentHover = true; Instance = new RemoteWebDriver(new Uri("http://10.220.68.64:4444/wd/hub"), IEoptions.ToCapabilities()); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.RemoteSofianesIENoNativeEvents: IEoptions = new InternetExplorerOptions(); IEoptions.IgnoreZoomLevel = true; IEoptions.EnableNativeEvents = false; Instance = new RemoteWebDriver(new Uri("http://10.220.68.64:4444/wd/hub"), IEoptions.ToCapabilities() ); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.RemoteFrometaIE: IEoptions = new InternetExplorerOptions(); IEoptions.IgnoreZoomLevel = true; IEoptions.EnableNativeEvents = false; Instance = new RemoteWebDriver(new Uri("http://172.18.58.24:4444/wd/hub"), IEoptions.ToCapabilities() ); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IENoNativeEvents: IEoptions = new InternetExplorerOptions(); IEoptions.EnableNativeEvents = false; IEoptions.EnablePersistentHover = true; //Clean Cache on Every Session -> // IEoptions.EnsureCleanSession = true; Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.45\32bits", IEoptions); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.Chrome: Instance = new ChromeDriver(@"C:\Selenium\ChromeDriver"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(0)); Instance.Manage().Window.Maximize(); break; case Browser.IE246: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.46\32bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE247: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.47\32bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE248: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.48\32bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE249: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.49\32bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE250: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.50\32bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE251: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.51\32bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE252: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.52\32bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE24664: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.46\64bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE24764: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.47\64bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE24864: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.48\64bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE24964: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.49\64bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE25064: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.50\64bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE25164: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.51\64bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; case Browser.IE25264: Instance = new InternetExplorerDriver(@"C:\Selenium\IEDriver\2.52\64bits"); Instance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20)); Instance.Manage().Window.Maximize(); break; default: break; } }
public void NavigateToAdminPage() { driver.Url = "http://localhost/litecart/admin/"; driver.Manage().Window.Maximize(); }