public void AddReviewerNote(String type, String note) { BtnAddReviwerNote.Click(); var popup = new ReviewerNotePopup(ReviewerNotePopup.PopupMode.Add); popup.SwitchTo(); popup.SelNoteType.SelectOption(type); popup.TxtNote.Value = note; popup.BtnOk.Click(); popup.SwitchBackToParent(WaitForPopupToClose.Yes); Thread.Sleep(1500); WaitForPageLoad(); }
public void AddReviewerNote(String type, String note) { BtnAddReviwerNote.Click(); var popup = new ReviewerNotePopup(ReviewerNotePopup.PopupMode.Add); popup.SwitchTo(); popup.SelNoteType.SelectOption(type); popup.TxtNote.Value = note; popup.BtnOk.Click(); popup.SwitchBackToParent(WaitForPopupToClose.Yes); Thread.Sleep(1500); WaitForPageLoad(); }
public void EditReviewerNoteWithPopup(Int32 index, String newType, String newNote) { if (BtnExpandNotes.Exists) { BtnExpandNotes.Click(); Wait.Until(d => BtnCollapseNotes.Exists); } // accept index starting at 0, xpath index start at 1, and the first row is the filter, so // add 2 to index argument var popupLink = new Link(By.XPath("//*[@id='_webrRSV_DIV_0']/table/tbody/tr[" + (index + 2) + "]/td[1]/a/img")); popupLink.Click(); var popup = new ReviewerNotePopup(ReviewerNotePopup.PopupMode.Edit); popup.SwitchTo(); popup.SelNoteType.SelectOption(newType); popup.TxtNote.Value = newNote; popup.BtnOk.Click(); popup.SwitchBackToParent(WaitForPopupToClose.Yes); Thread.Sleep(1500); WaitForPageLoad(); }
public void RespondToNoteWithPopup(Int32 index, String responseType, String response) { if (BtnExpandNotes.Exists) { BtnExpandNotes.Click(); Wait.Until(d => BtnCollapseNotes.Exists); } // accept index starting at 0, xpath index start at 1, and the first row is the filter, so // add 2 to index argument var popupLink = new Link(By.XPath("//*[@id='_webrRSV_DIV_0']/table/tbody/tr[" + (index + 2) + "]/td[1]/a/img")); popupLink.Click(); var popup = new ReviewerNotePopup(ReviewerNotePopup.PopupMode.Respond); popup.SwitchTo(); popup.SelResponseType.SelectOption(responseType); popup.TxtResponse.Value = response; popup.BtnOk.Click(); popup.SwitchBackToParent(WaitForPopupToClose.Yes); Thread.Sleep(1500); WaitForPageLoad(); }
public void EditNoteInPopup(Int32 index, String noteType, String newText) { var btnOpenPopup = new Button(By.XPath(XpathPrefix + "//tr[@data-drsv-row='" + index + "']//img[contains(@src, 'ReviewNote.gif')]")); var popup = new ReviewerNotePopup(ReviewerNotePopup.PopupMode.Edit); btnOpenPopup.Click(); popup.SwitchTo(); popup.SelNoteType.SelectOption(noteType); popup.TxtNote.Value = newText; popup.BtnOk.Click(); popup.SwitchBackToParent(); Wait.Until(d => new Container(By.XPath("//div[contains(text(), '" + newText + "')]")).Displayed); }