title: Scraping a webpage with multiple tabs in R -- Can't access tables
body: <p>I've looked through a bunch of the stackoverflow questions regarding similar issues but I'm stumped and can't seem to figure out what I'm doing wrong.</p>
  
  <p>I've tried to both view the page source and find the table I want as well as use the SelectorGadget tool to find the elements that I'm trying to scrape and nothing seems to get me what I want.</p>
  
  <p>Here is the closest I've gotten:</p>
  
  <p>I'm trying to scrape the offensive and defensive stats from the Offense and Defense tabs of this page (and all subsequent games after this page):</p>
  
  <pre><code>library(tidyverse)
  library(rvest)
  url &lt;- read_html("https://stats.xfl.com/1")
  </code></pre>
  
  <p>Looking at the html nodes I've gotten this output:</p>
  
  <pre><code>tbls &lt;- html_nodes(url, "#gameStats")
  tbls
  
  {xml_nodeset (6)}
  [1] &lt;div id="gameStats" data-bind="visible: vmTeamStats.isVisible"&gt;\r\n      &lt;div class="statDi ...
  [2] &lt;div id="gameStats" data-bind="visible: vmOffensiveStats.isVisible"&gt;\r\n\r\n      &lt;div clas ...
  [3] &lt;div id="gameStats" data-bind="visible: vmDefensiveStats.isVisible"&gt;\r\n      &lt;div class="s ...
  [4] &lt;div id="gameStats" data-bind="visible: vmPlayListStats.isVisible"&gt;\r\n      &lt;div class="st ...
  [5] &lt;div id="gameStats" data-bind="visible: vmPlayListStats.isScoringVisible"&gt;\r\n      &lt;!-- ko ...
  [6] &lt;div id="gameStats" data-bind="visible: vmPossessionStats.isVisible"&gt;\r\n      &lt;div class=" ...
  </code></pre>
  
  <p>This seems to get me close, as now I can see each table in this list. However, I can't figure out the next step to, for example, select the Rushing, Passing, and Receiving tables for the respective visitor and home teams.</p>
  
  <p>I've tried to look at what tables are in the offensive tab but I get the following error:</p>
  
  <pre><code>tbls %&gt;% 
    .[2] %&gt;% 
    html_table()
  
  Error in html_table.xml_node(X[[i]], ...) : 
    html_name(x) == "table" is not TRUE
  </code></pre>
  
  <p>Any thoughts on what I'm doing incorrectly and how I can make it work?</p>