title: Puppeteer select link in nth child of table cell
body: <p>I have a function:</p>
  
  <pre><code>const tableData = await page.evaluate(() =&gt; {
   const tds = Array.from(document.querySelectorAll('table tbody tr td'))
   for (var i = 0; i &lt; tds.length; i++) {
   ...
   ...
    availableDates.push([i,dateString,day])
   }
   return availableDates
  }
  </code></pre>
  
  <p>and this function cycles all cells of a table and I filter based on some conditions some dates out of there. </p>
  
  <p>So far so good. The cells contain a href which I want to click. The array holds the number of the cell which I want to click on the first array item and so I have tried:</p>
  
  <pre><code>await page.focus('table tbody tr td:nth-child('+tableData[0][0]+') a' )
      await page.keyboard.type('\n');
  </code></pre>
  
  <p>but without luck. I get the following error message:</p>
  
  <pre><code>(node:81325) UnhandledPromiseRejectionWarning: Error: No node found for selector: table tbody tr td:nth-child(109) a
  .......
  </code></pre>
  
  <p>What must I change? Thanks. </p>