div tag not populating, using selenium python, inner HTML
Question: I'm trying to access what appears to be a hidden table within a div tag on the
following page:

[whoscored.com](https://www.whoscored.com/Matches/959574/LiveStatistics/England-
Premier-League-2015-2016-West-Bromwich-Albion-Stoke)

...under the link "Passing"

    
    
    from selenium import webdriver
    
    driver = webdriver.Chrome()
    base_url = "https://www.whoscored.com/Matches/959574/LiveStatistics/England-Premier-League-2015-2016-West-Bromwich-Albion-Stoke"
    driver.get(base_url)
    

First i click the link:

    
    
    elem = driver.find_element_by_link_text("Passing")
    elem.click()
    driver.implicitly_wait(10)
    

Next, I try to get the innerhtml of the tag where it appears this table
resides.

    
    
    demo_div = driver.find_element_by_id("live-player-home-passing")
    print demo_div.get_attribute('innerHTML')
    print driver.execute_script("return arguments[0].innerHTML", demo_div)
    

But the innerhtml comes up empty in that tag. Very frustrating, because I see
the data on the page, but can't figure out a way to grab it.

Any ideas? I would greatly appreciate any help.

Edit: Here is the HTML:

    
    
    <div id="live-player-home-passing" class="statistics-table-tab">
      <div id="statistics-table-home-passing-loading"></div>
      <div id="statistics-table-home-passing"></div>
      <div id="statistics-table-home-passing-column-legend"></div>
    </div>
    

The data is within 3rd tag, but only visible when I do "Inspect Element":

    
    
    <div id="live-player-home-passing" class="statistics-table-tab" style="display: block;">
        <div id="statistics-table-home-passing" data-fwsc="1">
            <table id="top-player-stats-summary-grid" class="grid with-centered-columns hover">
                <thead id="player-table-statistics-head">
                .....
    
                </thead>
            </table>
        </div>
    


Answer: The source its what cames from the server and the inspect its your browser
representation of the information

try to get the innerHTML directly from the webelement and not js script

    
    
    table = driver.find_element_by_id("top-player-stats-summary-grid");
    

