Пример #1
0
        public void UserCanDragItems()
        {
            var browser = new TestBrowser();

            browser.Initialize();
            var interactionsPage = new InteractionsPage(browser);

            interactionsPage.Visit("Draggable");

            browser.Close();
        }
Пример #2
0
        public void UserCanSortItems()
        {
            var browser = new TestBrowser();

            browser.Initialize();
            var interactionsPage = new InteractionsPage(browser);

            interactionsPage.Visit("Sortable");
            var     driver = (IWebDriver)browser.Instance.Native;
            Actions act    = new Actions(driver);

            var from = 1;
            var to   = 2;

            interactionsPage.MoveElementFromTo(from, to, act);
            string[] expected = { "Item 2", "Item 1", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7" };
            var      actual   = interactionsPage.CheckSort();

            Assert.AreEqual(expected, actual);

            browser.Close();
        }