Beispiel #1
0
        private void CreateRedLetterDayWithDragNDrop()
        {
            //calendar.MainForm.Self.Activate();
            System.DateTime day1;
            System.DateTime day2;
            string          strday1, strday2;

            calendar.MainForm.btnCalendar.Click();
            calendar.MainForm.btnNewAppointment.Click();
            Delay.Seconds(1);
            calendar.EventDetailForm.PnlBase.txtAppointmentTitle.PressKeys(data);
            cmn.SelectItemDropdown(calendar.EventDetailForm.PnlBase.SelectEvent, "Red Letter Day", "Event Type Dropdown");
            calendar.EventDetailForm.btnOK.Click();
            Delay.Seconds(3);
            calendar.MainForm.btnCalendar.Click();
            calendar.MainForm.btnViewMenu.Click();
            calendar.MainForm.menuListView.Click();
            Delay.Seconds(3);
            cmn.VerifyDataExistsInTable(calendar.MainForm.tblCalendar, data, "Calendar List");

            calendar.MainForm.Toolbar.btnWeek.Click();
            day1              = System.DateTime.Now;
            day2              = day1.AddDays(1);
            strday1           = day1.ToString("MMMM d, yyyy");
            strday2           = day2.ToString("MMMM d, yyyy");
            calendar.curwkday = strday1;
            calendar.MainForm.PnlViews.shrtDay.Click();
            calendar.appmtData = data;
            //calendar.MainForm.PnlViews.txtappointment;
            Delay.Seconds(2);
            Ranorex.Text sourceappt = calendar.MainForm.PnlViews.txtappointment;
            calendar.curwkday = strday2;
            DragNDropLibrary.DragAndDrop(sourceappt, calendar.MainForm.PnlViews.shrtDay);
        }
Beispiel #2
0
        private void CreateApptDrgNDropWithinSameDay()
        {
            //calendar.MainForm.Self.Activate();
            calendar.MainForm.btnCalendar.Click();
            calendar.MainForm.btnNewAppointment.Click();
            Delay.Seconds(1);
            calendar.EventDetailForm.PnlBase.txtAppointmentTitle.PressKeys(data);
            calendar.EventDetailForm.PnlBase.txtStartTime.PressKeys(System.DateTime.Now.ToShortTimeString());
            calendar.EventDetailForm.PnlBase.txtEndTime.PressKeys(System.DateTime.Now.AddHours(1).ToShortTimeString());
            calendar.EventDetailForm.btnOK.Click();
            Delay.Seconds(3);
            AppointmentOverlapPrompt();
            ValidateEventRemainderPopup();
            calendar.MainForm.btnCalendar.Click();
            calendar.MainForm.btnViewMenu.Click();
            calendar.MainForm.menuListView.Click();
            Delay.Seconds(3);
            cmn.VerifyDataExistsInTable(calendar.MainForm.tblCalendar, data, "Calendar List");
            calendar.MainForm.Toolbar.btnToday.Click();
            calendar.MainForm.PnlViews.tbCurrentDay.Click();
            //calendar.EventDetailForm.btnCancel.Click();
            calendar.MainForm.Self.Activate();
            string currentDayData = String.Format("Appointment '{0}'", data);

            calendar.curdayapptselection = currentDayData;
            Ranorex.Cell curdaysource = calendar.MainForm.PnlViews.txtCurrentDayAppt;
            string       destTime     = RoundUpTimeFormat(System.DateTime.Now);

            calendar.curdayapptselection = destTime;
            DragNDropLibrary.DragAndDrop(curdaysource, calendar.MainForm.PnlViews.txtCurrentDayAppt);
        }
        private void CreateRepeatedAppointment()
        {
            System.DateTime day1;
            System.DateTime day2;
            string          strday1, strday2;

            calendar.MainForm.Self.Activate();
            calendar.MainForm.btnCalendar.Click();
            calendar.MainForm.btnNewAppointment.Click();
            Delay.Seconds(1);
            calendar.EventDetailForm.PnlBase.txtAppointmentTitle.PressKeys(data);
            calendar.EventDetailForm.PnlBase.txtStartTime.PressKeys(System.DateTime.Now.ToShortTimeString());
            calendar.EventDetailForm.PnlBase.txtEndTime.PressKeys(System.DateTime.Now.AddHours(1).ToShortTimeString());
            calendar.EventDetailForm.PnlBase.Repeat.Click();
            cmn.SelectItemDropdown(calendar.EventDetailForm.PnlBase.cmbbxRepeat, "Weekly", "Repeat Dropdown");
            calendar.weekday = System.DateTime.Now.ToString("ddd");
            calendar.EventDetailForm.PnlBase.cbWeekday.Check();
            Delay.Seconds(1);
            calendar.weekday = System.DateTime.Now.AddDays(1).ToString("ddd");
            calendar.EventDetailForm.PnlBase.cbWeekday.Check();
            cmn.SelectItemDropdown(calendar.EventDetailForm.PnlBase.cmbbxHolidayRule, "Cancel that occurrence", "Holiday Rule Dropdown");
            calendar.EventDetailForm.btnOK.Click();
            Delay.Seconds(3);
            AppointmentOverlapPrompt();
            ValidateEventRemainderPopup();
            calendar.MainForm.btnCalendar.Click();
            calendar.MainForm.btnViewMenu.Click();
            calendar.MainForm.menuListView.Click();
            Delay.Seconds(3);
            cmn.VerifyDataExistsInTable(calendar.MainForm.tblCalendar, data, "Calendar List");



            calendar.MainForm.Toolbar.btnWeek.Click();
            day1              = System.DateTime.Now;
            day2              = day1.AddDays(2);
            strday1           = day1.ToString("MMMM d, yyyy");
            strday2           = day2.ToString("MMMM d, yyyy");
            calendar.curwkday = strday1;
            calendar.MainForm.PnlViews.shrtDay.Click();
            calendar.appmtData = data;
            //calendar.MainForm.PnlViews.txtappointment;
            Delay.Seconds(2);

            Ranorex.Text sourceappt = calendar.MainForm.PnlViews.txtappointment;
            calendar.curwkday = strday2;
            DragNDropLibrary.DragAndDrop(sourceappt, calendar.MainForm.PnlViews.shrtDay);
            Delay.Seconds(2);
            Validate.Exists(calendar.RepeatingEventDialogForm.SelfInfo, "Repeating Event Exception Dialog is seen");
            calendar.RepeatingEventDialogForm.Toolbar1.btnThisOne.Click();
            Delay.Seconds(2);
            calendar.curwkday = strday2;
            calendar.MainForm.PnlViews.shrtDay.Click();
            calendar.appmtData = data;
            Validate.Exists(calendar.MainForm.PnlViews.txtappointmentInfo, "Appt Moved to a new Date");
        }
        private void CreateAdjrnApptWithDragnDrop()
        {
            string new_Data = "";
            string strday1, strday2;

            System.DateTime day1, day2;
            calendar.MainForm.Self.Activate();
            calendar.MainForm.btnCalendar.Click();
            calendar.MainForm.btnNewAppointment.Click();
            Delay.Seconds(1);
            calendar.EventDetailForm.PnlBase.txtAppointmentTitle.PressKeys(data);
            calendar.EventDetailForm.PnlBase.txtStartTime.PressKeys(System.DateTime.Now.ToShortTimeString());
            calendar.EventDetailForm.PnlBase.txtEndTime.PressKeys(System.DateTime.Now.AddHours(1).ToShortTimeString());
            calendar.EventDetailForm.PnlBase.cbMilestone.Check();
            calendar.EventDetailForm.PnlBase.cbShowAdjournments.Check();
            calendar.EventDetailForm.btnOK.Click();
            Delay.Seconds(3);
            AppointmentOverlapPrompt();
            ValidateEventRemainderPopup();
            calendar.MainForm.btnCalendar.Click();
            calendar.MainForm.btnViewMenu.Click();
            calendar.MainForm.menuListView.Click();
            Delay.Seconds(3);
            new_Data += "Milestone: " + data;
            cmn.VerifyDataExistsInTable(calendar.MainForm.tblCalendar, new_Data, "Calendar List");

            calendar.MainForm.Toolbar.btnWeek.Click();
            day1              = System.DateTime.Now;
            day2              = day1.AddDays(2);
            strday1           = day1.ToString("MMMM d, yyyy");
            strday2           = day2.ToString("MMMM d, yyyy");
            calendar.curwkday = strday1;
            calendar.MainForm.PnlViews.shrtDay.Click();
            calendar.appmtData = data;

            Delay.Seconds(2);
            Validate.Exists(calendar.MainForm.PnlViews.txtappointmentInfo, "Adjourned Appointment present as expected");
            Ranorex.Text sourceappt = calendar.MainForm.PnlViews.txtappointment;
            calendar.curwkday = strday2;
            DragNDropLibrary.DragAndDrop(sourceappt, calendar.MainForm.PnlViews.shrtDay);
            Delay.Seconds(2);

            Validate.Exists(calendar.AdjournmentReasonForm.SelfInfo, "Adjournment Reason Form");
            calendar.AdjournmentReasonForm.txtAdjournReason.Click();
            calendar.AdjournmentReasonForm.txtAdjournReason.PressKeys(String.Format("Moving 2 days from current Day {0}", System.DateTime.Now.ToShortDateString()));
            calendar.AdjournmentReasonForm.Toolbar1.ButtonOK.Click();
            calendar.curwkday = strday2;
            calendar.MainForm.PnlViews.shrtDay.Click();
            calendar.appmtData = data;
            Validate.Exists(calendar.MainForm.PnlViews.txtappointmentInfo, "Master Instance of the new Appointment Exists as expected");
        }