I\'m working with Selenium in Python. I would like to get the value of an attribute [\'href\'] and check that it is different from \'#\', if yes
so click on the link if not
elems = driver.find_elements_by_xpath("//a[@href]")
e = []
for elem in elems:
val = elem.get_attribute("href")
if "#" in val:
print("found # do nothing")
else:
print("click this link ",val)
// click link
e.append(elem)
// call click function
e[0].click()