Drag and Drop Issues in IFrames
I Have to perform a drag and Drop in my Application
My source is the main window and my destination drop box is in iFrame in the main window only.
Iam not able to use actions class.
WebElement box1 = driver.findElement(By.id(“box1″));
WebElement dropbox = driver.findElement(By.id(“dropBox”));
Actions act = new Actions(driver);
PLease help me to achieve this
Nice situation, never though of this and never came across.
Suggestion: Use Cordinates
WebElement draggable = driver.findElement(By.id("")); Actions act = new Actions(driver); act.dragAndDropBy(draggable, 10, 20)// 10 & 20 will be your destination element cordinates, so you need to get the cordinates first in your test only act.build() act.perform();