I want to perform drag and drop in W3school web page using selenium. Code is working fine but output is not showing on the webpage.
link is :- http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_draganddrop
My code is :-
public String dragAndDrop(String object,String data){
APP_LOGS.debug("waiting for popup closer");
try{
driver.switchTo().frame("iframeResult");
WebElement element = driver.findElement(By.xpath(".//*[@id='drag1']"));
WebElement target = driver.findElement(By.xpath(".//*[@id='div1']"));
(new Actions(driver)).dragAndDrop(element, target).build().perform();
}catch(Exception e){
return Constants.KEYWORD_FAIL+" -- Unable to drag"+e.getMessage();
}
return Constants.KEYWORD_PASS;
}