This is my first time with both Python and Selenium, and I'm trying to select and click on an element of the navigation bar of this website - stockfetcher.com
I would like to click on the MyFilters tab on the navigation bar. After inspecting the element, I see that the HTML code for that element is
<a href="/myfilters">
"MyFilters "
<span class="tab-pill"></span>
</a>
And here's what I trying to do
driver.find_element_by_link_text("MyFilters ").click()
And I get this error
AttributeError: 'NoneType' object has no attribute 'click'
Any idea what's wrong? Most examples I watched online did not have "" around whatever is inside the tag. Is that what's messing me up?
.click(), you would get the same error if you replaced.click()with.fsghudghur(). Whateverfind_element_by_link_textreturns had noclick()function.type(driver.find_element_by_link_text("MyFilters ")). See if what is returned is what you want. Also try printing it withprint(driver.find_element_by_link_text("MyFilters ")). Is that good as well?.click()won't just not work here, but.click()won't work anywhere. Check the documentation to make sure.click()exists, if not then make sure you are using the right version.