title: Not able to execute jquery code in puppeteer
body: <p>I need to click an anchor tag with in a table.
  This anchor tag is located as first element in the last td of a tr.</p>
  <p>I am able to do using jQuery but I'm facing issues when I try to execute the same with Puppeteer can you please help me on the same.</p>
  <p>my jQuery code is</p>
  <pre><code>  $('table tr td.uname').each(function(el){
  
      var name  = $(this).text();
  
     if($.trim(name) == 'testmyself111'){
       $(this).parent().find(':last-child&gt;a')[0].click();
     }
    });
  </code></pre>
  <p>This is what I'm trying to do but not able to execute</p>
  <pre><code>      await page.addScriptTag({
          url: 'https://code.jquery.com/jquery-3.4.1.min.js'
       });
        let tr = await page.evaluate(() =&gt; {
          let results;
          let items = document.querySelectorAll('table tr td.uname');
         
               items.forEach((item) =&gt; {
              if (item.innerText == 'TESTMYSELF111') {
                  results = item.parentElement;
              }
         
          });
          return results;
      });
      const anchor = await page.evaluate((tr) =&gt; {
          // get the body anchor tag 
          const atag= $(tr).parent().find(':last-child&gt;a')[0];
          return atag;
      }, tr);
      console.log(anchor);
  </code></pre>