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.
js = "var aa=document.getElementsByClassName('classname');aa.parentNode.removeChild(aa)"
I get error that parentNode is undefined.
So what the best way to delete an element using Selenium?