Ejemplo n.º 1
0
        public void TC100_ValidateContrainMovementDrag()
        {
            DemoQaHome hm = new DemoQaHome(dr);

            //Validate home page title
            Assertions.AreEqual <String>("Home", hm.pageHeading.Text, "Validating Home page heading");
            //Take screenshot
            SeleniumScreenshot.TakeScreenShot("Homescreen.png");
            //Click on Draggable side Menu
            hm.menuItem.interactionMenu.Draggable.ClickOnIt();
            //Validate Draggable default page title
            DefaultDraggable dd = new DefaultDraggable(dr);

            Assertions.AreEqual <string>("Draggable", dd.pageHeading.Text, "Validating Draggable Page heading");
            //Take screenshot
            SeleniumScreenshot.TakeScreenShot("DraggableDefautl.png");
            //Click on constrain movement
            dd.subMenu.ConstrainMovement.ClickOnIt();
            //Take screenshot
            SeleniumScreenshot.TakeScreenShot("ConstrainMovementDefault.png");
            //Perform actions
            DraggableContraintMovement cons = new DraggableContraintMovement(dr);

            cons.MoveElementBy(cons.horizontalDrag, 100, 0);
            cons.MoveElementBy(cons.verticalDrag, 0, 50);
            cons.MoveElementBy(cons.constrainDrag, 100, 100);
            SeleniumScreenshot.TakeScreenShot("AfterContrainMovement.png");
            test.Log(LogStatus.Pass, "Drag actions performed");
        }
Ejemplo n.º 2
0
        public void TC101_ValidateDefualtDraggable()
        {
            DemoQaHome hm = new DemoQaHome(dr);

            //Validate home page title
            Assert.AreEqual("Home", hm.pageHeading.Text);
            //Take screenshot
            SeleniumScreenshot.TakeScreenShot("Homescreen.png");
            hm.menuItem.interactionMenu.Draggable.ClickOnIt();
            ExplicitWaits.ElementIsVisible(By.TagName("h1"));
            Assert.AreEqual("Draggable", dr.FindElement(By.TagName("h1")).Text);
            test.Log(LogStatus.Pass, "Draggable page title validated");
            DefaultDraggable drg = new DefaultDraggable(dr);

            SeleniumScreenshot.TakeScreenShot("DraggableHome.png");
            drg.moveElementBy(100, 100, drg.draggableBox);
            SeleniumScreenshot.TakeFullPageScreenShot("DraggableElement_afterDrag");
            test.Log(LogStatus.Pass, "Drag operation performed");
        }