import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
public class JquerySite
{
public static void main(String[] args) {
WebDriver driver=new FirefoxDriver();
driver.get("http://jqueryui.com/droppable/");
driver.manage().window().maximize();
driver.switchTo().frame(driver.findElement(By.xpath("//iframe[@src='/resources/demos/droppable/default.html']")));
WebElement source=driver.findElement(By.xpath(".//*[@id='draggable']"));
//WebElement target=driver.findElement(By.xpath(".//*[@id='droppable']"));
Actions dd=new Actions(driver);
dd.dragAndDropBy(source, 150, 30).build().perform();
//dd.dragAndDropBy(target, 20, 250).build().perform();
}
}
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
public class JquerySite
{
public static void main(String[] args) {
WebDriver driver=new FirefoxDriver();
driver.get("http://jqueryui.com/droppable/");
driver.manage().window().maximize();
driver.switchTo().frame(driver.findElement(By.xpath("//iframe[@src='/resources/demos/droppable/default.html']")));
WebElement source=driver.findElement(By.xpath(".//*[@id='draggable']"));
//WebElement target=driver.findElement(By.xpath(".//*[@id='droppable']"));
Actions dd=new Actions(driver);
dd.dragAndDropBy(source, 150, 30).build().perform();
//dd.dragAndDropBy(target, 20, 250).build().perform();
}
}