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 EditReviewerNoteInline(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 editLink = new Link(By.XPath("//*[@id='_webrRSV_DIV_0']/table/tbody/tr[" + (index + 2) + "]/td[2]/div[1]/strong/a")); editLink.Click(); var inlineSelect = new Select(By.XPath("//*[@id='_webrRSV_DIV_0']/table/tbody/tr[" + (index + 2) + "]/td[2]/div[1]/div/select")); var inlineNoteText = new TextBox(By.XPath("//*[@id='_webrRSV_DIV_0']/table/tbody/tr[" + (index + 2) + "]/td[2]/div[3]/textarea")); inlineSelect.SelectOption(newType); inlineNoteText.Value = newNote; BtnInlineReviewerNoteOk.Click(); Wait.Until(d => new Container(By.XPath("//div[text()='" + newNote + "']")).Exists); }