I'm using the python package selenium to write a script that will automatically set up appointments for myself every week. What I ultimately want here is to be able to click the button with id="1103222339". I initially tried driver.find_element_by_id("1103222339").click()
, but I cannot guarantee that every time I run this script that the appointment I need will correspond to this ID. To solve this issue, I want to look at the label that has text specifying the time and date of the appointment I want, then somehow retrieve the id through that for value.
I have not used XPath before, how do I find the element that a label is for through its text?