title: Size() method of list is not providing the correct result
body: <p>Trying to get the number of result links in the yatra.com site. text from the list is displaying appropriate result but the size() method of list is not showing the correct result. </p>
  
  <pre><code>public class Yatra {
  
      static {
          System.setProperty("webdriver.chrome.driver",`enter code here` "./driver/chromedriver.exe");
      }
  
      public static void main(String[] args) throws InterruptedException {
  
          WebDriver driver = new ChromeDriver();
          driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
          driver.get("https://www.yatra.com/");
          driver.manage().window().maximize();
  
          driver.findElement(By.id("BE_flight_origin_city")).sendKeys("BLR");
          Thread.sleep(1000);
          driver.findElement(By.id("BE_flight_origin_city")).sendKeys(Keys.ENTER);
          driver.findElement(By.id("BE_flight_arrival_city")).sendKeys("DEL");
          Thread.sleep(1000);
          driver.findElement(By.id("BE_flight_arrival_city")).sendKeys(Keys.ENTER);
  
          driver.findElement(By.id("BE_flight_depart_date")).click();
          driver.findElement(By.id("a_2017_10_25")).click();
          driver.findElement(By.id("BE_flight_flsearch_btn")).submit();
          Thread.sleep(3000);
  
          JavascriptExecutor js = (JavascriptExecutor) driver;
          for (int i = 0; i &lt; 10; i++) {
              js.executeScript("window.scrollTo(0,document.body.scrollHeight)");
              Thread.sleep(1000);
          }
  
          List&lt;WebElement&gt; myResult = driver.findElements(By.id("resultList_0"));
          for (int j = 0; j &lt; myResult.size(); j++) {
              WebElement display = myResult.get(j);
              String text = display.getText();
              System.out.println(text);
          }
          System.out.println(myResult.size());
      }
  }
  </code></pre>
  
  <p>OUTPUT:
  <a href="https://www.dropbox.com/s/xe8dkcx83fuki5w/output.txt?dl=0" rel="nofollow noreferrer">Output file</a></p>