title: Python selenium, how can i delete an element?
body: <p>I've been trying the last hour to delete an element by without any success. And the element can only be reached via class name.
  I've tried:</p>
  
  <pre><code>js = "var aa=document.getElementsByClassName('classname')[0];aa.parentNode.removeChild(aa)"
  driver.execute_script(js)
  </code></pre>
  
  <p>I get error that parentNode is undefined.</p>
  
  <p>So what the best way to delete an element using Selenium?</p>