#getElementsByName() getElementById() 方法相似,查询元素的 name 属性,id 属性。 getElementsByClassName 返回的是列表
js ="var x = document.getElementsByClassName('pv-ask-modal-wrap');x[0].remove();" #删除网页里面第一个class 为pv-ask-modal-wrap的标签源码
browser.execute_script(js)
python selenium js操作
猜你喜欢
转载自blog.csdn.net/AnYeZhiYin/article/details/105808117
今日推荐
周排行