title: How to Paste (long) text from Clipboard to Textarea using Puppeteer
body: <p>I am trying to enter some text in a textarea field using Puppeteer.</p>
  
  <p>My approach is to copy the text to the clipboard, then click on the textarea and try to paste it in. However, the text is not added to the input field.</p>
  
  <p>Things I've tried:</p>
  
  <ul>
  <li><p>Using page.type takes a long time because the text is a few thousand characters. I would rather avoid this.</p></li>
  <li><p>Using page.$eval("#textarea", (el, in) => el.value = in, text) does not work because the site is an SPA.</p></li>
  </ul>
  
  <pre><code>await clipboardy.writeSync(text);
  await page.click("#textarea")
  await page.waitFor(500);
  await page.keyboard.down('Control');
  await page.keyboard.down('Shift');
  await page.keyboard.press('KeyV');
  await page.keyboard.up('Control');
  await page.keyboard.up('Shift');
  // does not paste
  // also tried, clipboardy.readSync();
  // does not paste either
  </code></pre>
  
  <p>The expected result is to enter the text in the SPA textarea.</p>