【发布时间】:2020-07-24 01:38:06
【问题描述】:
我对硒有点陌生,所以请原谅我的无知。 我正在尝试从网站获取 ajax 加载表的行。 代码如下所示:
try:
table = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "tableid")))
finally :
for row in table.xpath(".//tr"):
print(row)
但是,我收到以下错误:
AttributeError: 'WebElement' object has no attribute 'xpath'
告诉我错误是什么
【问题讨论】:
标签: python-3.x selenium selenium-chromedriver