Yes its possible you can store all link in an array and then click on them like this :
ArrayList<WebElement> input_type = (ArrayList<WebElement>) driver.findElements(By.tagName("a")); for (WebElement type : input_type) { type.click(); } This will strore and all links and click them one by one.