我正在使用Selenium webdriver(chrome)和
Python,试图从
页面上的所有
链接获取href.当我尝试以下
内容时:
- items = driver.find_elements_by_tag_name("a")
- print items
-
- for item in items:
- href = item.Get_Attribute('href')
- print href
它设法获取所有链接,但在get_attribute上我收到一个错误:
‘WebElement’对象没有属性’Get_Attribute’
虽然我看到的任何地方似乎都应该有效.
有解决方案吗
谢谢!