You need to call GetAttribute()
with actual attribute name. Replace:
lists1[0].GetAttribute("a href");
with:
lists1[0].GetAttribute("href");
In C#, for anchor tags
string url = lists1[0].Url();
will yield the same result as
string url = ists1[0].GetAttribute("href");
NOTE: Both returns complete Url even if the href has relative path in anchor tag.
For <a href="/profile/my-profile-id" />
element.Url();
// returns http://mywebsite.com/profile/my-profile-id
element.GetAttribute("href");
// returns http://mywebsite.com/profile/my-profile-id
C#
element.GetAttribute("attribute name");
Ruby
element.attribute("attribute name")
Python
element.get_attribute("attribute name")
Java
element.getAttribute("attribute name")