title: How to click and hold in Puppeteer
body: <p>I am trying to click and hold using Puppeteer. I tried using <code>page.click</code> inside a <code>while</code> loop but it didn't work.</p>
  <pre><code>let browserURL = `http://127.0.0.1:9222`;
  
  let browser = await puppeteer.connect({ browserURL, defaultViewport: null });
  
  const page = await browser.newPage();
  while (pageContent.includes(&quot;hold&quot;)) {
    await page.click(&quot;div&quot;)
  }
  </code></pre>
  <p>I also tried this:</p>
  <pre><code>await page.mouse.click(132, 103, { button: 'left' })
  </code></pre>
  <p>Any ideas how to do this?</p>