コード例 #1
0
        public void LoadingNext()
        {
            Actions actions = new Actions(driver);

            StronaLogowania stronaLogowania = new StronaLogowania(driver, BAZA_PELNA);
            StronaGlowna    stronaGlowna    = stronaLogowania.ZalogujAdministrator();

            stronaGlowna.NavigateFolder("Handel", "Towary i usługi");
            var TopValue = driver.FindElementByXPath("//*[@id=\"List_canvas\"]/div[1]").Location.Y;
            var Point    = driver.FindElementByXPath("//*[@id=\"List_canvas\"]/div[1]").Location.Y;

            Assert.AreEqual(Point, TopValue);

            actions.SendKeys(Keys.PageDown).Perform();
            Point = driver.FindElementByXPath("//*[@id=\"List_canvas\"]/div[1]").Location.Y;

            Assert.Less(Point, TopValue);

            actions.SendKeys(Keys.PageDown).Perform();
            Point = driver.FindElementByXPath("//*[@id=\"List_canvas\"]/div[1]").Location.Y;

            Assert.Less(Point, TopValue);

            actions.SendKeys(Keys.PageDown).Perform();
            Point = driver.FindElementByXPath("//*[@id=\"List_canvas\"]/div[1]").Location.Y;

            Assert.Less(Point, TopValue);

            actions.SendKeys(Keys.PageDown).Perform();
            Point = driver.FindElementByXPath("//*[@id=\"List_canvas\"]/div[1]").Location.Y;

            Assert.Less(Point, TopValue);
        }
コード例 #2
0
        public void LoadingKeepNextTest()
        {
            Actions         actions         = new Actions(driver);
            StronaLogowania stronaLogowania = new StronaLogowania(driver, BAZA_PELNA);
            StronaGlowna    stronaGlowna    = stronaLogowania
                                              .ZalogujAdministrator();

            stronaGlowna.NavigateFolder("Handel", "Towary i usługi");
            var LiczbaRekordow = driver.FindElementsByXPath("//*[@id=\"List_canvas\"]/*").Count;

            Assert.AreEqual(50, LiczbaRekordow);

            var TopValue = driver.FindElementByXPath("//*[@id=\"List_canvas\"]/div[1]").Location.Y;
            var Point    = driver.FindElementByXPath("//*[@id=\"List_canvas\"]/div[1]").Location.Y;

            Assert.AreEqual(TopValue, Point);

            actions.SendKeys(Keys.PageDown).Perform();
            LiczbaRekordow = driver.FindElementsByXPath("//*[@id=\"List_canvas\"]/*").Count;

            Assert.AreEqual(50, LiczbaRekordow);

            Point = driver.FindElementByXPath("//*[@id=\"List_canvas\"]/div[1]").Location.Y;

            Assert.Less(0, Point);

            //list.postLoadMoreRowsNext(); // Wysłanie List:next
            // wygląda na funkcję wywoływaną z wnętrza (nie dostępna z poziomu Selenium
        }
コード例 #3
0
        public void GoToInner()
        {
            StronaLogowania stronaLogowania = new StronaLogowania(driver, BAZA_PELNA);
            StronaGlowna    stronaGlowna    = stronaLogowania
                                              .ZalogujAdministrator();

            stronaGlowna.NavigateFolder("Handel", "Towary i usługi");
        }
コード例 #4
0
        public void Locator()
        {
            StronaLogowania stronaLogowania = new StronaLogowania(driver, BAZA_PELNA);
            StronaGlowna    stronaGlowna    = stronaLogowania
                                              .ZalogujAdministrator();

            stronaGlowna.NavigateFolder("Handel", "Towary i usługi");
            var locator = driver.FindElementById("List_Locator");

            locator.SendKeys("W");
            Thread.Sleep(1000);
            var t = driver.FindElementsByXPath("//*[@id=\"List_canvas\"]/*").Count;

            t = driver.FindElementsByXPath("//*[@id=\"List_canvas\"]/*").Count - 1;
            Thread.Sleep(1000);

            Assert.AreEqual(8, t);
        }