Пример #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();
            }
        }
Пример #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();
            }
        }