python selenium find by text code example
Example 1: selenium find element by content
driver.find_elements_by_xpath("//*[contains(text(), 'My Button')]")
Example 2: selenium select element by id
driver.findElement(By.id("ui-datepicker-div"));
driver.find_elements_by_xpath("//*[contains(text(), 'My Button')]")
driver.findElement(By.id("ui-datepicker-div"));