public static void main(String[] args) throws InterruptedException {
WebDriver driver = new FirefoxDriver();
driver.get("http://toolsqa.com/automation-practice-switch-windows/");
WebElement clickElement = driver.findElement(By.id("button1"));
for(int i = 0; i < 3; i++) {
clickElement.click();
Thread.sleep(3000);
}
}