title: puppeteer: clicking button in shadowroot
body: <p>I'm having difficulties with actions on elements in shadowroot in my test context. Lets say I have a web component <code>&lt;my-component /&gt;</code> and it contains a button <code>&lt;input id=&quot;my-button&quot; type=&quot;submit&quot; /&gt;</code></p>
  <p>From console in chrome, I can do the following:</p>
  <pre><code>document.getElementsByTagName('my-component')[0].shadowRoot.querySelector('#my-button').click()
  </code></pre>
  <p>Im struggling doing the same with puppeteer.</p>
  <pre><code>  it('should click the button', async () =&gt; {
      await page.goto(`https://localhost:${port}`, {
        waitUntil: ['networkidle0', 'load'],
      });
  
      await page.$eval('my-component', (el: Element) =&gt; {
        el.shadowRoot.querySelector('#my-button').click();
      });
    });
  </code></pre>
  <p>Clicking the button should fire an http request to my server that retrieves some data which I then want to assert on in the dom. The request never fires. Suggestions?</p>