How to get all the links in the webpage and click (hidden links should be eliminated) using Selenium Webdrivers
i would like to click the links which are visible on the page

public void linksclick() throws Exception{ System.setProperty("", "H:\\Intermec_Selenium\\sample\\src\\chromedriver. exe"); WebDriver driver = new ChromeDriver(); baseUrl = ""; driver.get(baseUrl); //driver.get(baseUrl); List allLinks = driver.findElements(By.tagName("a")); System.out.println("All Links--> " + allLinks.size()); //Fetching an nth Link System.out.println(" 1st Link is--> " + allLinks.get(1).getText()); //Fetching all the Links for (int i=0;i