Reputation: 31
I need help in using selenium driver to click on that mail. I've tried and tried and I'm only getting errors.
I've done this:
driver.find_elements_by_partial_link_text("Email Test").click()
but got error:
AttributeError: 'list' object has no attribute 'click'
Location of he element
Upvotes: 1
Views: 46
Reputation: 15480
Here find_elements_*
will give a list of all found elements, where find_element_*
will return only the first find. So try:
driver.find_element_by_partial_link_text("Email Test").click()
Otherwise, if you want to iterate over the list and click all:
for link in driver.find_elements_by_partial_link_text("Email Test"):
link.click()
Upvotes: 1