title: How to click on specific link after extracting all the links from a web page in selenium webdriver
body: <p>I am new to automation world and working on automating the BBC website . I have got number of links and also the text present in that links.
  . I want to click on a particular link with text "Accessibility Help". please advise how can i do it. following is my code:</p>
  
  <pre><code>  import java.util.List;
  
  import org.openqa.selenium.By;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.firefox.FirefoxDriver;
  
  
  public class BBC_AllLinks {
  
      public static void main(String[] args) throws InterruptedException {
          // TODO Auto-generated method stub
  
          WebDriver driver = new FirefoxDriver();
          driver.get("http://www.bbc.com");
          List&lt;WebElement&gt; allLinks = driver.findElements(By.tagName("a"));
          //Total number of links in the webpage
          System.out.println("Total Links--&gt; "+allLinks.size());
          //35th index
          Thread.sleep(4000);
      for (int i =0; i&lt;=allLinks.size();i++)
          System.out.println(allLinks.get(i).getText()+"----"+allLinks.get(i).isDisplayed());
      }
  
  }
  </code></pre>