/// <summary> /// RecordedMethod1 - Use 'RecordedMethod1Params' to pass parameters into this method. /// </summary> public void RecordedMethod1() { #region Variable Declarations WinEdit uIIdBoxEdit = this.UISphereBookingandChecWindow.UIBookingFormWindow.UIIdBoxWindow.UIIdBoxEdit; WinButton uICheckButton = this.UISphereBookingandChecWindow.UIBookingFormWindow.UICheckWindow.UICheckButton; WinDateTimePicker uIDateTimePicker1DateTimePicker = this.UISphereBookingandChecWindow.UIBookingFormWindow.UIDateTimePicker1Window.UIDateTimePicker1DateTimePicker; WinButton uISearchButton = this.UISphereBookingandChecWindow.UIBookingFormWindow.UISearchWindow.UISearchButton; WinEdit uISessionBoxEdit = this.UISphereBookingandChecWindow.UIBookingFormWindow.UISessionBoxWindow.UISessionBoxEdit; WinEdit uIStaffschBoxEdit = this.UISphereBookingandChecWindow.UIBookingFormWindow.UIStaffschBoxWindow.UIStaffschBoxEdit; WinButton uISubmitButton = this.UISphereBookingandChecWindow.UIBookingFormWindow.UISubmitWindow.UISubmitButton; #endregion // Type '3' in 'idBox' text box uIIdBoxEdit.Text = this.RecordedMethod1Params.UIIdBoxEditText; // Click 'Check' button Mouse.Click(uICheckButton, new Point(29, 12)); // Select '02/03/2017' in 'dateTimePicker1' date time picker uIDateTimePicker1DateTimePicker.DateTimeAsString = this.RecordedMethod1Params.UIDateTimePicker1DateTimePickerDateTimeAsString; // Click 'Search' button Mouse.Click(uISearchButton, new Point(55, 12)); // Type '15' in 'sessionBox' text box uISessionBoxEdit.Text = this.RecordedMethod1Params.UISessionBoxEditText; // Type '2' in 'staffschBox' text box uIStaffschBoxEdit.Text = this.RecordedMethod1Params.UIStaffschBoxEditText; // Click 'Submit' button Mouse.Click(uISubmitButton, new Point(248, 13)); }
/// <summary> /// Asserts the date time picker. /// </summary> /// <param name="data">The data.</param> public static void AssertDateTimePicker(string[] data) { WinDateTimePicker dateTimePicker = ( WinDateTimePicker )Robot.FindWinControl(typeof(WinDateTimePicker), data[0], _root); Assert.AreEqual(dateTimePicker.DateTime.Year, int.Parse(data[1])); Assert.AreEqual(dateTimePicker.DateTime.Month, int.Parse(data[2])); Assert.AreEqual(dateTimePicker.DateTime.Day, int.Parse(data[3])); }
private static WinDateTimePicker GetWinDateTimePicker(string uiTitle, string uiType) { var htmlcontrolWin = new WinDateTimePicker(Window.Locate(uiTitle, uiType)); var htmlControlWin = htmlcontrolWin; htmlControlWin.TechnologyName = TechnologyNameWin; return(htmlControlWin); }
/// <summary> /// dateofbirth /// </summary> public void RecordedMethod1() { #region Variable Declarations WinDateTimePicker uIDOBDateTimePicker = this.UIDOBWindow.UIDOBDateTimePicker; #endregion // Last mouse action was not recorded. // Select '08/12/1998' in 'DOB' date time picker uIDOBDateTimePicker.DateTimeAsString = this.RecordedMethod1Params.UIDOBDateTimePickerDateTimeAsString; }
/// <summary> /// Clicks the date time picker. /// </summary> /// <param name="data">The data.</param> public static void ClickDateTimePicker(string[] data) { WinDateTimePicker dateTimePicker = ( WinDateTimePicker )Robot.FindWinControl(typeof(WinDateTimePicker), data[0], _root); dateTimePicker.SetProperty("DateTime", data[1] + "/" + data[2] + "/" + data[3]); }
/// <summary> /// Set the specific date time picker a key /// </summary> /// <param name="name">The edit's name</param> /// <param name="key">The value you want to set</param> /// <exception cref="Exception">If the control is not found</exception> public static void SetDateTimePicker(string name, DateTime dateTime) { WinDateTimePicker picker = (WinDateTimePicker)Robot.FindWinControl(typeof(WinDateTimePicker), name, _root); picker.DateTime = dateTime; }