如何单击网页中使用Selenium Python更改网页的多个元素

我要单击的每个元素都会通过创建更多元素来更改网页。当我单击第一个时,没问题。在必须单击的第二个元素上,引发ElementClickinterceptedException,因为该元素由于第一次单击而改变了位置。如何无例外地单击所有元素?
这是我的代码:

elements = driver.find_elements_by_css_selector('div.something')
for i in elements:
    i.click()
出现此错误的

selenium.common.exceptions.ElementClickinterceptedException: Message: element click intercepted:
Element <div class="something">...</div> is not clickable at point (5,5). Other element would
receive the click: <div class="another_thing">...</div>
iCMS 回答:如何单击网页中使用Selenium Python更改网页的多个元素

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/1989522.html

大家都在问