【发布时间】:2018-02-11 13:50:57
【问题描述】:
我正在从这个链接中抓取一些数据 https://www.vbgov.com/property-search#DetailView=14760123360000。但我无法使用 webdriver Selenium 和 python 在“销售历史和税务信息”选项卡上模拟点击事件。
driver.get("https://www.vbgov.com/property-search#")
searchBox1 = driver.find_element_by_id("consolidated-search-query")
searchBox1.send_keys("1124 LUKE DR")
searchBox1.send_keys(Keys.ENTER)
driver.implicitly_wait(5)
link = driver.find_element_by_xpath('//*[@id="property"]/tbody/tr/td[2]/a')
link.click()
elem = driver.find_element_by_xpath('//*[@id="property-counts"]/h4')
tab = driver.find_element_by_partial_link_text("Sales History & Tax Information")
tab.click()
【问题讨论】:
-
您看到了什么错误(如果有)?
find_element_by_partial_link_text()是否引发错误?是click()?还是只是浏览器中似乎什么也没发生?
标签: python selenium webdriver click simulate