示例#1
0
        public void MinResizeElement()
        {
            var page = new ResizablePage(driver);

            page.NavigateToResizable();
            page.MinMaxBtn.Click();
            builder.DragAndDropToOffset(page.arrowMinMax, -200, -200).Perform();

            int editedWidth  = page.elementMinMax.Size.Width;
            int editedHeight = page.elementMinMax.Size.Height;

            Assert.GreaterOrEqual(200, editedWidth);
            Assert.GreaterOrEqual(150, editedHeight);
        }
示例#2
0
        public void ResizeElement()
        {
            var page = new ResizablePage(driver);

            page.NavigateToResizable();
            int height = page.ElementToResize.Size.Height;
            int width  = page.ElementToResize.Size.Width;

            builder.DragAndDropToOffset(page.ResizeArrow, 75, 152).Perform();
            int heightAfter = page.ElementToResize.Size.Height;
            int widthAfter  = page.ElementToResize.Size.Width;

            Assert.IsTrue(heightAfter > height);
            Assert.IsTrue(widthAfter > width);
        }
示例#3
0
        public void ConstrainedResizeElement()
        {
            var page = new ResizablePage(driver);

            page.NavigateToResizable();
            page.constrainResizeAreaBTN.Click();
            int originalWidth  = page.constrainResizableElement.Size.Width;
            int originalHeight = page.constrainResizableElement.Size.Height;

            builder.DragAndDropToOffset(page.ConstrainedResizeArrow, 200, 200).Perform();

            int editedWidth  = page.constrainResizableElement.Size.Width;
            int editedHeight = page.constrainResizableElement.Size.Height;

            Assert.GreaterOrEqual(page.constrainContainer.Size.Width, editedWidth);
            Assert.GreaterOrEqual(page.constrainContainer.Size.Height, editedHeight);
        }