Exemplo n.º 1
0
        public void DraggableSource()
        {
            var draggablePage = new DraggablePage(this.driver);

            draggablePage.DragAndDrop(380, 130);
            draggablePage.AssertTargetAttributeValue("ui-widget-content ui-draggable ui-draggable-handle");

            draggablePage.DragAndDrop(0, -75);
            draggablePage.AssertTargetAttributeValue("ui-widget-content ui-draggable ui-draggable-handle");

            draggablePage.DragAndDrop(50, 60);
            draggablePage.AssertTargetAttributeValue("ui-widget-content ui-draggable ui-draggable-handle");

            draggablePage.DragAndDrop(-40, -30);
            draggablePage.AssertTargetAttributeValue("ui-widget-content ui-draggable ui-draggable-handle");

            draggablePage.DragAndDrop(71, -50);
            draggablePage.AssertTargetAttributeValue("ui-widget-content ui-draggable ui-draggable-handle");

            draggablePage.DragAndDrop(1000, 1000);
            draggablePage.AssertTargetAttributeValue("ui-widget-content ui-draggable ui-draggable-handle");

            draggablePage.DragAndDrop(219, 100);
            draggablePage.AssertTargetAttributeValue("ui-widget-content ui-draggable ui-draggable-handle");

            draggablePage.DragElement(70, 100);
            draggablePage.AssertTargetAttributeValue("ui-widget-content ui-draggable ui-draggable-handle ui-draggable-dragging");
            draggablePage.DragElement(200, 250);
            draggablePage.AssertTargetAttributeValue("ui-widget-content ui-draggable ui-draggable-handle ui-draggable-dragging");
            draggablePage.DragElement(150, 120);
            draggablePage.AssertTargetAttributeValue("ui-widget-content ui-draggable ui-draggable-handle ui-draggable-dragging");
        }
Exemplo n.º 2
0
        public void DraggableFirstTry()
        {
            this.driver = new ChromeDriver();
            var draggablePage = new DraggablePage(this.driver);

            draggablePage.NavigateTo();
            var firstlocationX = draggablePage.Source.Location.X;
            var firstlocationY = draggablePage.Source.Location.Y;

            draggablePage.DragAndDrop(20);
            draggablePage.AssertNewLocation(firstlocationX, firstlocationY);
        }