Drag & Drop Action:
This script allows you to do drag & drop elements; Drag & Drop operations make use of the Actions classes
Actions builder = new Actions(driver);
Action dragAndDrop = builder.clickAndHold(source Element)
.moveToElement(target Element)
.release(target Element)
.build();
dragAndDrop.perform();
(or)
Actions builder = new Actions(driver);
Action dragAndDrop = builder.dragAndDrop(source Element, target Element).build();
dragAndDrop.perform();
Mouse Hover Action:
This script allows you to do Mouse Hover elements; Mouse Hover operations make use of the Actions classes
Actions builder = new Actions(driver);
WebElement HoverLink = driver.findElement(By.linkText("source Element"));
builder.moveToElement(HoverLink);
builder.perform();
This script allows you to do drag & drop elements; Drag & Drop operations make use of the Actions classes
Actions builder = new Actions(driver);
Action dragAndDrop = builder.clickAndHold(source Element)
.moveToElement(target Element)
.release(target Element)
.build();
dragAndDrop.perform();
(or)
Actions builder = new Actions(driver);
Action dragAndDrop = builder.dragAndDrop(source Element, target Element).build();
dragAndDrop.perform();
Mouse Hover Action:
This script allows you to do Mouse Hover elements; Mouse Hover operations make use of the Actions classes
Actions builder = new Actions(driver);
WebElement HoverLink = driver.findElement(By.linkText("source Element"));
builder.moveToElement(HoverLink);
builder.perform();
Hi Sams ..
ReplyDeleteReally nice blog for Selenium people and one small request can you do a blog on Report Generating using Testng and Maven .. Thanks
Thanks for the request. I'll have a blog on it ASAP.
DeleteCheers!
Sams
Very nice explanations..Could you please do it for ANT with testNG?
ReplyDeletegood posts.. keep doing. All the best dude
ReplyDeleteLoved reading this thankks
ReplyDelete