title: Puppeteer - Removing elements by class
body: <p>I try to remove elements by classname but it doesn't work.</p>
  
  <p>This is the code i used:</p>
  
  <pre><code>await page.screenshot({path: 'pic.png'});   //for testing purposes
      let div_selector_to_remove= ".xj7.Kwh5n";
      var thingToRemove = document.querySelectorAll(div_selector_to_remove);
      var number_of_elements = thingToRemove.length;
      for (var i = 0; i &lt; number_of_elements.length; i++) {
          thingToRemove[i].parentNode.removeChild(thingToRemove);
      }
  </code></pre>
  
  <p>The browser loads and i get a screenshot with the elements loaded. The nothing happens. The elements remain there</p>