Find the left part of the calendar startcalendar = driver.findelement(By.CSSSELECTOR,…
Jump to turn (6)
- 1Find the left part of the calendar startcalendar = driver.findelement(By.CSSSELE
- 2Perfect! Then determine the day of week of the first day of month
- 3How to select day in calendar with data-title="r0c2"?
- 4If I need to change 2 from static numbet to variable dayofweek?
- 5See the code Find the left part of the calendar startcalendar = driver.findeleme
- 6What is alternative solution?
- User
Find the left part of the calendar
start_calendar = driver.find_element(By.CSS_SELECTOR, '.drp-calendar.left')
Select the desired option value for monthselect
month_select = Select(start_calendar.find_element(By.CSS_SELECTOR, '.monthselect')) month_select.select_by_value("10")
Re-find the start calendar element to avoid StaleElementReferenceException
start_calendar = driver.find_element(By.CSS_SELECTOR, '.drp-calendar.left')
Find the yearselect element within start_calendar and select the desired option value
year_select = Select(start_calendar.find_element(By.CSS_SELECTOR, '.yearselect')) year_select.select_by_value("1995")
month_select.select_by_value("10") year_select.select_by_value("1995") dtermine month and year. Can you determine the week number of the first day of month if month is selected and year is selected?
- Assistant