how to get an attribute value from a href link in selenium
You need to call GetAttribute()
with actual attribute name. Replace:
lists1[0].GetAttribute("a href");
with:
lists1[0].GetAttribute("href");
C#
element.GetAttribute("attribute name");
Ruby
element.attribute("attribute name")
Python
element.get_attribute("attribute name")
Java
element.getAttribute("attribute name")