【发布时间】:2021-08-03 13:01:48
【问题描述】:
错误: selenium.common.exceptions.NoSuchElementException:消息:没有这样的元素:无法找到元素:{"method":"css selector","selector":"#submit-6359ad565c26651cca764d4e291dca49"}
在这个网站上:https://provide-journey-contact-details.homeoffice.gov.uk/next,我收到“保存并继续”按钮的错误,我尝试通过 xpath 找到它,然后通过 css 选择器找到它,但它不起作用。我该怎么办?请帮忙。
driver.find_element_by_xpath(email_address).send_keys("almacompexim@yahoo.com")
driver.find_element_by_xpath(email_verify).send_keys("almacompexim@yahoo.com")
driver.find_element_by_xpath(password).send_keys("Alin1234")
driver.find_element_by_xpath(password_verify).send_keys("Alin1234")
wait = WebDriverWait(driver, 20)
wait.until(EC.visibility_of_element_located((By.XPATH, "//*[contains(@id, 'submit')]"))).click()
【问题讨论】:
-
找不到页面...
标签: python selenium xpath selenium-chromedriver