Пример #1
0
        public void ResizableWindowLimited()
        {
            var     resizablePage = new ResizablePage(this.driver);
            Actions builder       = new Actions(this.driver);

            resizablePage.Navigate();
            resizablePage.ConstResizableButton.Click();
            builder.DragAndDropToOffset(resizablePage.ResizableButon, 110, 110).Perform();
            resizablePage.AssertResizableButtonXY(445, 510);
        }
Пример #2
0
        public void HelperResizableTest()
        {
            var     resizablePage = new ResizablePage(this.driver);
            Actions builder       = new Actions(this.driver);

            resizablePage.Navigate();
            resizablePage.HelperResizableButton.Click();
            int width  = resizablePage.ResizeWindow.Size.Width;
            int height = resizablePage.ResizeWindow.Size.Height;

            builder.DragAndDropToOffset(resizablePage.ResizableButon1, 100, 100).Perform();
            resizablePage.AssertHelperResizableWindowBiggerThan(width + 90, height + 90);
        }
Пример #3
0
        public void ResizeBoxWidthAndHeight()
        {
            // Arrange
            _resizablePage.Navigate(_resizablePage.Url);

            // Act
            var resizableBox = _resizablePage.ResizableElement;

            double expectedWidth  = resizableBox.Size.Width + 84;
            double expectedHeight = resizableBox.Size.Height + 84;

            var resizeHadle = _driver.FindElement(By.XPath(@"//*[@id=""resizable""]/div[3]"));

            var builder = new Actions(_driver);

            builder.DragAndDropToOffset(resizeHadle, 100, 100).Perform();

            double actualWidth  = resizableBox.Size.Width;
            double actualHeight = resizableBox.Size.Height;

            // Assert
            Assert.AreEqual(expectedHeight, actualHeight, 2);
            Assert.AreEqual(expectedWidth, actualWidth, 2);
        }
        public void Init()
        {
            _resizablePage = new ResizablePage(Driver);

            _resizablePage.Navigate();
        }