WebElement draggable3 = driver.findElement(By.id("ABC"));
new Actions(driver).dragAndDropBy(draggable3, 400, 90).build().perform();
public boolean isAlertPresent() { try { driver.switchTo().alert(); return true; } // try catch (NoAlertPresentException Ex) { return false; } // catch}
if(isAlertPresent()){ driver.switchTo().alert().accept(); }
final
String addOnPath =
"C:\\Temp\\addon.xpi"
;
File AOFile =
new
File( addOnPath );
FirefoxProfile profile =
new
FirefoxProfile();
profile.addExtension(
AOFile
);
WebDriver driver =
new
FirefoxDriver( profile );