Hi i would like to write registration bot.
I am using selenium with python and at the beginning I have encountered following problem.
elems = driver.find_elements_by_xpath("//a[@href]")
for elem in elems:
elem_ = elem.get_attribute("href")
regex = re.compile('signup')
match = re.search(regex, elem_)
if match:
print(elem_)
elem.click()
with that i am able to find registration link, but when i try to click it it gives me:
Message: stale element reference: element is not attached to the page document
am i badly accesing the element? how to execute click function on element from list created by find_elements_by_something?