public static void CheckIfCurrentDayScheduleExistAndCreateIfNot() { date = DateTime.Now.Date.ToShortDateString(); driver.FindElement(By.Id("lnkSchedule")).Click(); if (!UIMethods.IsElementPresent(By.Id(date))) { CreateScheduleWithCurrentDay(); } }
public void CreateSchedule() { UIMethods.Login(); UIMethods.CreateScheduleWithCurrentDay(); IWebDriver driver = UIMethods.driver; bool newDateExist = UIMethods.IsElementPresent(By.Id(DateTime.Now.Date.ToShortDateString())); Assert.True(newDateExist); driver.Dispose(); }