So I'm trying to click a link if it contains this string somewhere in its html. Here is the HTML:
<span class="_3A9bf_kZ6VBA2VBRND5gvf">r/smashbros</span>
I'm trying to click the link if it contains the word "smash" somewhere in the element, how would I go about this? I know I can easily do
driver.find_element_by_class_name("_3A9bf_kZ6VBA2VBRND5gvf").click()
I'm trying to find a way more dynamic way to find the element, since there is a chance that the element might not be there. Any help is appreciated.