示例#1
0
        public void DraggableInContainer()
        {
            this.driver = new ChromeDriver();
            var draggablePage = new DraggablePage(this.driver);

            draggablePage.NavigateTo();
            var newTag = this.driver.FindElement(By.XPath(" //*[@id=\"ui-id-2\"]"));

            newTag.Click();
            var firstlocationX  = draggablePage.SourseContained.Location.X;
            var firstlocationY  = draggablePage.SourseContained.Location.Y;
            var containerX      = draggablePage.Container.Location.X;
            var containerY      = draggablePage.Container.Location.Y;
            var containerWidth  = draggablePage.Container.Size.Width;
            var containerHeight = draggablePage.Container.Size.Height;

            draggablePage.DragAndDropInContainer(20);
            draggablePage.AssertNewLocationInContainer(firstlocationX, firstlocationY, containerX, containerY, containerWidth, containerHeight);
        }