【发布时间】:2025-12-29 23:25:12
【问题描述】:
我在 Python Selenium 中遇到了 angular 站点 scraping 当我点击它的任何链接时显示异常 selenium.common.exceptions.NoSuchElementException,chrome 驱动程序显示结果进入驱动程序但是当我尝试查找结果中出现的任何元素 python selenium 显示异常。
driver.get("https://recruiting.adp.com/srccar/public/RTI.home?c=1153651&d=ExternalCareerSite&rb=ConstellisSite#/")
job_elements = WebDriverWait(driver, 20).until(EC.visibility_of_all_elements_located(
(By.XPATH, "//a[@class='jobtitle job-title-link']")))
job = job_elements[0]
job.click()
//after some wait when elements visible into driver
driver.find_element_by_xpath("//span[@class='jobTitle job-detail-title']").text
然后异常显示,所以我如何提取在 agular 中单击后出现的元素。 我们将不胜感激。
【问题讨论】:
-
您的代码对我来说非常好。没有例外
标签: python selenium xpath css-selectors webdriverwait