Example #1
0
        public static void Browse(string username, Action <SouthwindBrowser> action)
        {
            var selenium = new ChromeDriver();

            var browser = new SouthwindBrowser(selenium);

            try
            {
                browser.Login(username, username);
                action(browser);
            }
            catch (UnhandledAlertException)
            {
                selenium.SwitchTo().Alert();
            }
            finally
            {
                selenium.Close();
            }
        }
Example #2
0
        public static void Browse(string username, Action<SouthwindBrowser> action)
        {
            var selenium = new ChromeDriver();

            var browser = new SouthwindBrowser(selenium);
            try
            {
                browser.Login(username, username);
                action(browser);
            }
            catch (UnhandledAlertException)
            {
                selenium.SwitchTo().Alert();

            }
            finally
            {
                selenium.Close();
            }
        }