public static void ITC_AlertEmail(IWebDriver driver)
 {
     GenericFunctions.ClickOnText("scheduleFeedbackMenu", driver);
     GenericFunctions.CheckTextIsOnPage("Alert Email Followup", driver);
     GenericFunctions.CheckTextIsOnPage("Select Site", driver);
     GenericFunctions.CheckTextIsOnPage("Select Subject", driver);
     GenericFunctions.CheckTextIsOnPage("Alert Email Type", driver);
     Functions.Reporting.ReportScreenshot("AlertEmail", driver);
 }
 public static void ITC_CheckScheduleKey(IWebDriver driver)
 {
     GenericFunctions.CheckTextIsOnPage("+Show key", driver);
     GenericFunctions.ClickOnText("+Show key", driver);
     GenericFunctions.CheckTextIsOnPage("-Hide key", driver);
     GenericFunctions.CheckTextIsOnPage("Set In the Past", driver);
     GenericFunctions.CheckTextIsOnPage("Scheduled", driver);
     GenericFunctions.CheckTextIsOnPage("Send Within 24 hours", driver);
     GenericFunctions.CheckTextIsOnPage("Sent", driver);
     GenericFunctions.ClickOnText("-Hide key", driver);
     Functions.Reporting.ReportScreenshot("Schedule_key", driver);
 }
 public static void ITC_ViewSubSched(int SubjectID, IWebDriver driver)
 {
     ITC_ViewSubject(SubjectID, driver);
     GenericFunctions.ClickOnText("Event Schedule", driver);
     GenericFunctions.CheckTextIsOnPage("Subject Schedule", driver);
     GenericFunctions.CheckTextIsOnPage("Click schedule icons to view message details.", driver);
     ITC_CheckScheduleKey(driver);
     GenericFunctions.CheckTextIsOnPage("Baseline Schedule", driver);
     GenericFunctions.CheckTextIsOnPage("Non-Baseline Schedule", driver);
     GenericFunctions.ClickElement(driver.FindElement(By.XPath("//span[@class='ui-close']")), driver);
     Functions.Reporting.ReportScreenshot("View_Subject_Sched", driver);
 }
        public static int ITC_EnrolSubject(IWebDriver driver)
        {
            var studyName = GenericFunctions.goAndGet("STUDYID");
            var siteName  = GenericFunctions.goAndGet("SITEID");
            var subjMob   = GenericFunctions.goAndGet("SUBJECTPHONE");

            var subjectId = (_dbActions.CountSubjects(driver) == 0 ? Convert.ToInt32(GenericFunctions.goAndGet("SITEPREFIX") + "0001") : _dbActions.GetLatestSubjectId(studyName, siteName, driver));

            GenericFunctions.ClickOnText("enrolmentLink", driver);
            GenericFunctions.Wait(5);
            GenericFunctions.SelectDropDownByText(siteName, "siteId", driver);
            GenericFunctions.Wait(5);
            //GenericFunctions.Type("English", "patientLanguageDropDown", driver);
            GenericFunctions.Type("" + subjectId, "userIdentifier", driver);
            GenericFunctions.Type(subjectId + "*****@*****.**", "SubjectEMail", driver);
            GenericFunctions.Type(subjMob, "SubjectMSISDN", driver);
            //GenericFunctions.Type("7700910000", "SubjectMSISDN", driver);
            GenericFunctions.Wait(5);

            var myDate = DateTime.Today.AddHours(23);

            datePicker(driver);

            //ItcTimePicker(2,myDate,driver);

            GenericFunctions.Type("In what city or town does your nearest sibling live?", "SecurityQuestionDropDownList", driver);
            GenericFunctions.Type("Nottingham", "Patient_SecurityQuestionAnswer", driver);

            Functions.Reporting.ReportScreenshot("Reg", driver);;
            //GenericFunctions.Wait(5);
            GenericFunctions.waitforElement("submitBtn", driver);
            GenericFunctions.ClickOnButton("submitBtn", driver);

            GenericFunctions.Wait(2);

            GenericFunctions.CheckTextIsOnPage(subjectId + " has been successfully enrolled in the study.", driver);
            Functions.Reporting.ReportScreenshot("Enrol", driver);
            return(subjectId);
        }