0
        //drag.  
            WebElement From=driver.findElement(By.xpath("//div[@id='settings']//div[2]"));
             Thread.sleep(3000);
         // drop.
          WebElement To=driver.findElement(By.xpath("//div[@class='panel-body']"));     

         Thread.sleep(3000);
         Actions act=new Actions(driver);   
         act.dragAndDrop(From,To).build().perform();    
    }   
  }
1

Try this:

 import org.openqa.selenium.interactions.Actions;

 Actions act=new Actions(driver.get());  
 act.dragAndDrop(a,b).release().build().perform(); 
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.