Hello, I am trying to click the button 'Test Here' using selenium in Python via chrome. I have no clue what it is not working. My code is shared below...
driver.find_element_by_xpath("//*[contains(text(), 'Test Here')]").click()
Click the button and not the span.
Add /parent::button would fix your xpath.
You can try the find_element_by_link_text method, like this:
driver.find_element_by_link_text("Test Here").click()
"driver.implicitly_wait(5)" before the "driver.find_element_by_link_text("Test Here").click()" line.