So there are multiple calendars (datepickers) on the page and I have managed to click on the desired calendar.
I want to click on the active date (current date). class="day active" How can I find this element after clicking on desired calendar glyphicon?
P.S. when I copy selector for this- I am getting
body > div:nth-child(27) > div.datepicker-days > table > tbody > tr:nth-child(4) > td.day.active
And when I inspect element and search td.day.active, I am able to reach that element.
So I have used below syntax for clicking on it.
WebDriverWait(driver, 30).until(lambda driver: driver.find_element_by_css_selector('td.day.active')).click()
But getting ElementNotVisibleException
I want a generic script to do this. I want to select the active date on this calendar. clicking on xpath doesnt work as there is no absolute path to it.