162
rated 0 times
[
167]
[
5]
/ answers: 1 / hits: 39647
/ 10 Years ago, wed, march 19, 2014, 12:00:00
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:
js = var aa=document.getElementsByClassName('classname')[0];aa.parentNode.removeChild(aa)
driver.execute_script(js)
I get error that parentNode is undefined.
So what the best way to delete an element using Selenium?
More From » python