DrarandDrop in Selenium



DrarandDrop in Selenium C#.

[Test]
public void DragandDrop()
{
        dr.Navigate().GoToUrl("http://demo.guru99.com/test/drag_drop.html");        
        //Element which needs to drag.            
        IWebElement From = dr.FindElement(By.XPath("//*[@id='credit2']/a"));

        //Element on which need to drop.        
        IWebElement To = dr.FindElement(By.XPath("//*[@id='bank']/li"));

        //Using Action class for drag and drop.        
        Actions act = new Actions(dr);

        //Dragged and dropped.        
        act.DragAndDrop(From, To).Build().Perform();
    }
Tags: ,
Leave a comment

Your email address will not be published. Required fields are marked *

Subscribe now

Receive weekly newsletter with educational materials, new courses, most popular posts, popular books and much more!

https://bridgejunks.com/ https://crownmakesense.com/ https://brithaniabookjudges.com/ https://hughesroyality.com/ https://rhythmholic.com/ https://bandar89.simnasfikpunhas.com/ https://www.100calshop.co.il/products/thailand/ https://myasociados.com/ https://solyser.com/ http://konfidence.cz/ https://muscadinepdx.com/ https://bandar89.parajesandinos.com.ve/ https://goremekoop.com/ https://oncoswisscenter.com/ https://www.turunclifehotel.com/bandar89/ https://www.houseofproducts.biz/ https://taimoormphotography.com/
BIJI18 BIJI18 BIJI18