title: Selenium Webdriver List with WebElements
body: <p>Hello i have to save from a page same <code>&lt;a&gt;</code> in the page and has got as <code>class=my_img</code> i save this elements in a List an after i try to go in firts element of list and after go back get the second element but the selenium give me this error </p>
  
  <blockquote>
    <p>Exception in thread "main"
    org.openqa.selenium.StaleElementReferenceException: Element not found
    in the cache - perhaps the page has changed since it was looked up</p>
  </blockquote>
  
  <p>and this is my code</p>
  
  <pre><code>    List &lt;WebElement&gt; Element = drivers.findElements(By.cssSelector(".my_img"));
      System.out.println("Megethos"+Element.size());
      System.out.println("Pame stous epomenous \n");
      for (i = 1; i &lt; Element.size(); i++) {
          drivers.manage().timeouts().implicitlyWait(35, TimeUnit.SECONDS);
          System.out.println(i+" "+Element.size());
          System.out.println(i+" "+Element.get(i));
          action.click(Element.get(i)).perform();
          Thread.sleep(2000);
          System.out.println("go back");
          drivers.navigate().back();
          Thread.sleep(6000);
          drivers.navigate().refresh();
          Thread.sleep(6000);
  
      }
  </code></pre>