Monday, June 2, 2014

How to do Drag and Dorp action using selenium webdriver




Actions builder = new Actions(driver);
WebElement listControl= driver.findElement(By.xpath("Xpath or CSS of element need to drop"));
WebElement canvas = driver.findElement(By.id("Xpath or id or  CSS of  where need to drop"));
builder.dragAndDrop(listControl, canvas).build().perform();

3 comments:

  1. Hi Venkata, In above statements, What is "builder" object?

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Actions builder = new Actions(driver);

      builder is the action object

      Delete