I have tried these two codes , it get executed but the action does not get performed ,Can any one tell me why?
//Type one approach
Actions action = new Actio
Try this code:
Actions ac = new Actions(driver);
ac.dragAndDrop(source element, target element);
ac.build().perform();
It will click-and-hold at the location of the source element, moves to the location of the target element, then releases the mouse.
Or
Actions ac = new Actions(driver);
ac.dragAndDropBy(source element, xOffset, yOffset);
ac.build().perform();
It will click-and-hold at the location of the source element, moves by a given offset, then releases the mouse.
Or
Actions ac = new Actions(driver);
ac.clickAndHold(onElement);
ac.moveToElement(toElement); or ac.moveToElement(toElement, xOffset, yOffset);
ac.build().perform();
It will do the action of the above two code.
I write this code on Java. You can convert in to your specified language.
Refereed from Actions.