how to find element by its text code example Example: selenium find element by content Click to copydriver.find_elements_by_xpath("//*[contains(text(), 'My Button')]")