【发布时间】:2021-01-30 08:49:39
【问题描述】:
问题:我无法点击“zgadzam sie”。 发生错误 "selenium.common.exceptions.NoSuchElementException: 消息:没有这样的元素:无法找到元素:{"method":"xpath","selector":"//span[@class= 'RveJvd snByac' 和 text()='Zgadzam się']"}"
问题:我该如何处理? image english image
from selenium import webdriver
import time
driver= webdriver.Chrome()
driver.implicitly_wait(3)
driver.get("https://www.google.com/")
driver.find_element_by_xpath("//span[@class='RveJvd snByac' and text()='Zgadzam się']").click()
driver.quit()
time.sleep(5)
【问题讨论】: