selenium报错elenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element,没有找到元素的解决办法
selenium在定位到一个button按钮时,报错,没有找到该元素
观察了一下页面的结构,使用xpath应该是可以定位到的
后面再定位该元素的代码前面加了一个 time.sleep(3) 等待3秒钟,完美解决
time.sleep(3)
driver.find_element_by_xpath('//div[@class="el-card__body"]/button').click()