title: How to scroll inside a div with Puppeteer?
body: <p>I want to use Puppeteer to scroll inside a div that has a scrollbar, but where the overall window doesn't have a scrollbar. Let's take for example, the following URL:</p>
  
  <p><a href="https://www.google.com/maps/place/DO+%26+CO+Restaurant+Stephansplatz/@48.2082385,16.3693837,17z/data=!4m7!3m6!1s0x476d079f2c500731:0xed65abfb2c337243!8m2!3d48.2082385!4d16.3715725!9m1!1b1" rel="noreferrer">https://www.google.com/maps/place/DO+%26+CO+Restaurant+Stephansplatz/@48.2082385,16.3693837,17z/data=!4m7!3m6!1s0x476d079f2c500731:0xed65abfb2c337243!8m2!3d48.2082385!4d16.3715725!9m1!1b1</a></p>
  
  <p>You can see in the left hand side there are reviews, and the whole section has a scrollbar. A quick inspect element shows that the whole thing is surrounded by a div which has the following classes <code>widget-pane-content scrollable-y</code>. So, I tried to do something like this:</p>
  
  <pre><code>const scrollable_section = 'div.widget-pane-content.scrollable-y';
  await page.evaluate((selector) =&gt; {
      const scrollableSection = document.querySelector(selector);
      scrollableSection.scrollTop = scrollableSection.offsetHeight;
  }, scrollable_section);
  </code></pre>
  
  <p>But, this didn't work. I also noticed that one clicks the space button, if it is focused inside the reviews section, it also scrolls down automatically. So, I also tried to do something like this:</p>
  
  <pre><code>await page.focus(scrollable_section);
  await page.keyboard.press('Space');
  </code></pre>
  
  <p>But, this also didn't seem to work. Any ideas how can I scroll inside a div with Puppeteer?</p>