def test_back_to_today(browser): schedule_page = SchedulePageObject(browser) visible_month_list = [ i.get_attribute("innerText") for i in schedule_page.month_names() ] current_month_index_in_month_list = visible_month_list.index( datetime.datetime.now().strftime("%B")) while not schedule_page.today_tile().is_displayed(): schedule_page.date_forward_arrow().click() sleep(1) schedule_page.today_tile().click() sleep(2) assert schedule_page.active_today_tile().is_displayed() assert schedule_page.month_names( )[current_month_index_in_month_list].is_displayed()
def test_today_date_is_selected(browser): schedule_page = SchedulePageObject(browser) day = datetime.datetime.now().day assert f'{day}\nTODAY' == schedule_page.active_today_tile().get_attribute( "innerText")