May 28, 2023 How do I find an element that contains specific text in Selenium WebDriver (Python)? Code peter driver.find_elements_by_xpath("//*[contains(text(), 'My Button')]")