public MeetingMinutesPage ClickToSaveChanges() { HtmlControl btn = new HtmlControl(_bw); btn.SearchProperties.Add(HtmlControl.PropertyNames.InnerText, "Save Changes"); btn.DrawHighlight(); Mouse.Click(btn); return(this); }
public FDMPage ClickUpdareFormsToAssignUser() { HtmlControl btn = new HtmlControl(_bw); btn.SearchProperties.Add(HtmlControl.PropertyNames.InnerText, "Update Forms"); btn.DrawHighlight(); Mouse.Click(btn); return(this); }
public FDMPage EnterUserName() { HtmlControl btn = new HtmlControl(_bw); btn.SearchProperties.Add(HtmlControl.PropertyNames.Class, "k-input kendo-form-control ng-pristine ng-untouched ng-valid"); btn.DrawHighlight(); Keyboard.SendKeys(btn, "BSI TEST"); return(this); }
public FDMPage CloseGetStartedNotification() { HtmlControl btn = new HtmlControl(_bw); btn.SearchProperties.Add(HtmlControl.PropertyNames.InnerText, "Close"); btn.DrawHighlight(); Mouse.Click(btn); return(this); }
public bool IsFormValuesCorrect() { HtmlControl datePicker = this.UIFormDetailsInternetEWindow.UIFormDetailsDocument.UIDateEdit; string datePickerValue = this.UIFormDetailsInternetEWindow.UIFormDetailsDocument.UIDateEdit.Text; datePicker.WaitForControlExist(); datePicker.DrawHighlight(); if (datePickerValue != DateTime.Now.ToString("M/dd/yyyy")) { return(false); } HtmlControl number = this.UIFormDetailsInternetEWindow.UIFormDetailsDocument.UINumberEdit; string numberValue = this.UIFormDetailsInternetEWindow.UIFormDetailsDocument.UINumberEdit.Text; number.DrawHighlight(); if (numberValue != DateTime.Now.ToString("M/dd/yyyy")) { return(false); } HtmlControl subject = this.UIFormDetailsInternetEWindow.UIFormDetailsDocument.UISubjectEdit; string subjectValue = this.UIFormDetailsInternetEWindow.UIFormDetailsDocument.UISubjectEdit.Text; subject.DrawHighlight(); if (subjectValue != DateTime.Now.ToString("M/dd/yyyy")) { return(false); } HtmlControl location = this.UIFormDetailsInternetEWindow.UIFormDetailsDocument.UILocationEdit; string locationValue = this.UIFormDetailsInternetEWindow.UIFormDetailsDocument.UILocationEdit.Text; location.DrawHighlight(); if (locationValue != DateTime.Now.ToString("M/dd/yyyy")) { return(false); } HtmlControl assignUser = this.UIFormDetailsInternetEWindow.UIFormDetailsDocument.UIUserList1_1Custom.UIItemEdit; string assignUserValue = this.UIFormDetailsInternetEWindow.UIFormDetailsDocument.UIUserList1_1Custom.UIItemEdit.Text; assignUser.DrawHighlight(); if (assignUserValue != "Rugile Petrukauskaite") { return(false); } return(true); }
public bool IsPDFDialogAppeared() { HtmlControl dialog = new HtmlControl(_bw); dialog.SearchProperties.Add(HtmlControl.PropertyNames.Id, "dialogModalLabel"); dialog.DrawHighlight(); if (dialog.InnerText == "PDF Export") { return(true); } else { return(false); } }
public FDMPage GetClosedPillValue() { HtmlControl controls = new HtmlControl(_bw); controls.SearchProperties.Add(HtmlControl.PropertyNames.Class, "btn btn-primary ng-pristine ng-untouched ng-valid"); HtmlControl control = new HtmlControl(controls); control.SearchProperties.Add(HtmlControl.PropertyNames.Class, "issue-count-number ng-binding"); control.DrawHighlight(); if (ClosedPillBefore == null) { ClosedPillBefore = control.InnerText; } else { ClosedPillAfter = control.InnerText; } return(this); }
public bool IsUserAssigned() { HtmlControl btn = new HtmlControl(_bw); btn.SearchProperties.Add(HtmlControl.PropertyNames.Class, "k-virtual-scrollable-wrap"); btn.DrawHighlight(); HtmlTable table = new HtmlTable(btn); HtmlControl cell; cell = table.GetCell(0, 3); cell.DrawHighlight(); if (cell.InnerText == "BSI TEST") { return(true); } else { return(false); } }
public MeetingMinutesPage FillMeetingMinuteForm() { HtmlControl datePicker = new HtmlControl(_bw); datePicker.SearchProperties.Add(HtmlControl.PropertyNames.Id, "Datepicker1Input_1"); datePicker.DrawHighlight(); Keyboard.SendKeys(datePicker, DateTime.Now.ToString("M/dd/yyyy")); HtmlControl number = new HtmlControl(_bw); number.SearchProperties.Add(HtmlControl.PropertyNames.Id, "TextBox2Input_1"); number.DrawHighlight(); Keyboard.SendKeys(number, DateTime.Now.ToString("M/dd/yyyy")); HtmlControl subject = new HtmlControl(_bw); subject.SearchProperties.Add(HtmlControl.PropertyNames.Id, "TextBox1Input_1"); subject.DrawHighlight(); Keyboard.SendKeys(subject, DateTime.Now.ToString("M/dd/yyyy")); HtmlControl location = new HtmlControl(_bw); location.SearchProperties.Add(HtmlControl.PropertyNames.Id, "TextBox3Input_1"); location.DrawHighlight(); Keyboard.SendKeys(location, DateTime.Now.ToString("M/dd/yyyy")); HtmlControl assignUser = new HtmlControl(_bw); assignUser.SearchProperties.Add(HtmlControl.PropertyNames.Class, "k-input kendo-form-control ng-pristine ng-untouched ng-valid"); assignUser.DrawHighlight(); Keyboard.SendKeys(assignUser, "Rugile Petrukauskaite"); return(this); }
/// <summary> /// Highlights the specified element. /// </summary> /// <param name="element">The element.</param> public override void Highlight(HtmlControl element) { element.DrawHighlight(); }
public static void Ereg_Release4Reference() { //Create BrowserWindow BrowserWindow browind = new BrowserWindow(); //Agreement Pane browind.WaitForControlReady(20000); browind.SearchProperties[UITestControl.PropertyNames.Name] = "Release for Reference Checks and Verification of Information"; //check checkbox HtmlCheckBox chkBox = new HtmlCheckBox(browind); chkBox.SearchProperties[HtmlCheckBox.PropertyNames.Id] = "ack3_agree"; chkBox.DrawHighlight(); //Button Save And Continue HtmlControl SaveCont = new HtmlControl(browind); SaveCont.SearchProperties[HtmlButton.PropertyNames.Id] = "ForwardButton_button"; SaveCont.DrawHighlight(); //chkBox.DrawHighlight(); if (chkBox.Checked == false) { //Verify SaveNContinue button is unable Assert.IsFalse(SaveCont.Enabled); chkBox.SetProperty(HtmlCheckBox.PropertyNames.Checked, true); } else { Assert.IsTrue(SaveCont.Enabled); } // Progress Meter HtmlCustom progress = new HtmlCustom(browind); progress.SearchProperties[HtmlCustom.PropertyNames.Id] = "progressmeter"; bool availabilty = (bool)progress.GetProperty(HtmlCustom.PropertyNames.Exists); string workflowEvent = PersonalInformation1.ReadData(1, "WORKFLOW"); if (workflowEvent == "S1PROSPECT") { Assert.IsTrue(availabilty, "Progress Meter is not showing"); HtmlSpan bar = new HtmlSpan(browind); bar.SearchProperties[HtmlSpan.PropertyNames.Id] = "meterlabel"; string percentage = (string)bar.GetProperty(HtmlSpan.PropertyNames.InnerText); Assert.AreEqual(percentage, "95%"); } else { Assert.IsFalse(availabilty, "Progress Meter is showing"); } //Click Save And Continue Mouse.Click(SaveCont); browind.WaitForControlReady(2000); }