Hiro 714
asked on
selenium python question
I want to list URLs in elems. Please advise.
elems = driver.find_elements_by_xpath("//a[contains(@href,'abc.com')]")
#for elem in elems:
url = elems.get_attribute("href")
print(url)
I'm getting this error.AttributeError Traceback (most recent call last)
<ipython-input-291-f30319c0a4c2> in <module>
2 #for elem in elems:
3
----> 4 url = elems.get_attribute("href")
5 print(url)
AttributeError: 'list' object has no attribute 'get_attribute'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.