I am trying to get the link from the attribute "a href"
<a href="http://fgkzc.downloader.info/download.php?id=bc56585624bbaf29ebdd65d0248cb620" rel="nofollow" class="dl_link 1" style="">Download</a>
What am I doing:
ReadOnlyCollection<IWebElement> lists1 = driver.FindElements(By.ClassName("dl_link"));
string s = lists1[0].GetAttribute("a href");
I get an element with class "dl_link 1", but I can’t get its link, is the string null?
source
share