title: Unable to locate an element within a table using selenium webdriver
body: <p>Table content is not being loaded using selenium webdriver. It displays only headers of the table but not the content.</p>
  
  <p>I have logged in successfully in my application but on the home screen there is a table with certain project listed, while using selenium it does not load the content in the table.</p>
  
  <p><strong>Selenium jars:</strong> 2.53<br>
  <strong>Mozilla Firefox version :</strong> 46.0</p>
  
  <p>Used google chrome browser for the same but it didn't work too.</p>
  
  <p>When I close the browser (Which selenium opened) and reopened it manually, it works fine. But when selenium opens it and go to home page, table data does not load.</p>
  
  <pre><code> &lt;div class="project-list-bg" _ngcontent-c1=""&gt;
  &lt;div class="col s12 project-container" _ngcontent-c1=""&gt;
  &lt;main _ngcontent-c1=""&gt;
  &lt;div class="col s12 search-block" _ngcontent-c1=""&gt;
  &lt;div class="search-wrapper" _ngcontent-c1=""&gt;
  &lt;label _ngcontent-c1=""&gt;Search: &lt;/label&gt;
  &lt;div class="card" _ngcontent-c1=""&gt;
  &lt;input class="ng-untouched ng-pristine ng-valid" type="text" _ngcontent-c1="" name="search"&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;table id="myTable" class="bordered centered " _ngcontent-c1=""&gt;
  &lt;thead _ngcontent-c1=""&gt;
  &lt;tr _ngcontent-c1=""&gt;
  &lt;th class="grey-text text-darken-1" width="10%" _ngcontent-c1=""&gt;
  Project ID
  &lt;i class="material-icons" _ngcontent-c1=""&gt;keyboard_arrow_down&lt;/i&gt;
  &lt;/th&gt;
  &lt;th class="grey-text text-darken-1" width="17%" _ngcontent-c1=""&gt;
  Project Name
  &lt;i class="material-icons" _ngcontent-c1=""&gt;keyboard_arrow_down&lt;/i&gt;
  &lt;/th&gt;
  &lt;th class="grey-text text-darken-1" _ngcontent-c1="" style="width: 12%;"&gt;
  Date Completed
  &lt;i class="material-icons" _ngcontent-c1=""&gt;keyboard_arrow_down&lt;/i&gt;
  &lt;/th&gt;
  &lt;th class="grey-text text-darken-1" width="10%" _ngcontent-c1="" style="background-image: none; "&gt;
  # of Runs
  &lt;i class="material-icons" _ngcontent-c1=""&gt;keyboard_arrow_down&lt;/i&gt;
  &lt;/th&gt;
  &lt;th class="grey-text text-darken-1" width="10%" _ngcontent-c1="" style="background-image: none; "&gt;
  Status
  &lt;i class="material-icons" _ngcontent-c1=""&gt;keyboard_arrow_down&lt;/i&gt;
  &lt;/th&gt;
  &lt;th class="grey-text text-darken-1" width="16%" _ngcontent-c1="" style="background-image: none; "&gt;
  Project Description
  &lt;i class="material-icons" _ngcontent-c1=""&gt;keyboard_arrow_down&lt;/i&gt;
  &lt;/th&gt;
  &lt;th width="12%" _ngcontent-c1="" style="background-image: none; "&gt;&lt;/th&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody _ngcontent-c1=""&gt;
  &lt;/table&gt;
  &lt;div class="pagination right-align" _ngcontent-c1=""&gt;
  &lt;pagination-controls _ngcontent-c1=""&gt;
  &lt;pagination-template&gt;
  &lt;ul class="ngx-pagination" role="navigation" aria-label="Pagination"&gt;
  &lt;/pagination-template&gt;
  &lt;/pagination-controls&gt;
  &lt;/div&gt;
  &lt;div class="row" _ngcontent-c1=""&gt;
  &lt;div class="col s6 add-btn2 left-align" _ngcontent-c1=""&gt;
  &lt;a _ngcontent-c1="" routerlink="/project-information" href="/project-information"&gt;
  &lt;button class="btn next-btn p-btn" _ngcontent-c1=""&gt; Add Project&lt;/button&gt;
  &lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="col s6 right-align" _ngcontent-c1=""&gt;
  &lt;ul id="myPager" class="pagination pager" _ngcontent-c1=""&gt;&lt;/ul&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/main&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>------------Selenium Code----------------------------------</p>
  
  <pre><code>package projectListingScreen;
  
  import org.testng.annotations.Test;
  
  import ObjectRepository.HomescreenObject;
  import ObjectRepository.PageObject;
  import loginScreen.LoginPage;
  
  import java.util.concurrent.TimeUnit;
  
  import org.openqa.selenium.By;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.firefox.FirefoxDriver;
  import org.openqa.selenium.support.PageFactory;
  import org.openqa.selenium.support.ui.ExpectedConditions;
  import org.openqa.selenium.support.ui.WebDriverWait;
  import org.testng.annotations.BeforeClass;
  import org.testng.annotations.BeforeTest;
  
  public class HomeScreen extends LoginPage {
  
      public WebDriver driver;
  
    @Test
    public void f() {
  
           WebDriverWait wait=new WebDriverWait(driver, 20);
            WebElement addprojectbutton;
            addprojectbutton = wait.until(ExpectedConditions.elementToBeClickable(By.xpath( "html/body/app-root/app-home/div/div/main/div[3]/div[1]/a/button")));
            addprojectbutton.click();
  
    }
  </code></pre>
  
  <p>I have to click this <code>&lt;button&gt;</code> element but if the table(HTML of the table you can find in comments) does not load properly then this button moves upward and selenium is unable to find this button and in return it gives null pointer exception.</p>