public void EditNoteInline(Int32 index, String noteType, String newText)
 {
     var lnkTitle = new Link(By.XPath(XpathPrefix + "//tr[@data-drsv-row='" + index + "']//a[contains(@class, 'ReviewTitle')]"));
     lnkTitle.Click();
     var noteArea = new TextBox(By.XPath(XpathPrefix + "//tr[@data-drsv-row='" + index + "']//textArea"));
     var btnEditOk = new Button(By.XPath(XpathPrefix + "//tr[@data-drsv-row='" + index + "']//input[@value = 'OK']"));
     var selType = new Select(By.XPath(XpathPrefix + "//tr[@data-drsv-row='" + index + "']//select"));
     Wait.Until(d => noteArea.Displayed);
     selType.SelectOption(noteType);
     noteArea.Value = newText;
     btnEditOk.Click();
     Wait.Until(d => new Container(By.XPath("//div[contains(text(), '" + newText + "')]")).Displayed);
 }
コード例 #2
0
 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);
 }
 public void RespondInline(Int32 index, String responseType, String response)
 {
     var lnkRespond = new Link(By.XPath(XpathPrefix + "//tr[@data-drsv-row='" + index + "']//a[contains(@id, 'CreateResponse')]"));
     lnkRespond.Click();
     var txtResponse = new TextBox(By.XPath(XpathPrefix + "//tr[@data-drsv-row='" + index + "']//div[@class='ResponseNote']//textarea"));
     var btnRespondOk = new Button(By.XPath(XpathPrefix + "//tr[@data-drsv-row='" + index + "']//div[@class='ResponseNote']//input[@value = 'OK']"));
     var selType = new Select(By.XPath(XpathPrefix + "//tr[@data-drsv-row='" + index + "']//div[@class='ResponseTitle']//select"));
     Wait.Until(d => txtResponse.Displayed);
     selType.SelectOption(responseType);
     txtResponse.Value = response;
     btnRespondOk.Click();
     Wait.Until(d => new Container(By.XPath("//div[contains(text(), '" + response + "')]")).Displayed);
 }
 public static void SetCriteria(this IDynamicResultSetView component, String attribute, String criteria, Int16 row = 0)
 {
     var optionElement = new Select(By.XPath("//select[contains(@name, 'queryField" + (row + 1) + "')]/option[text() = '" + attribute + "']"));
     var displayName = ((RoomComponent) component).DisplayName;
     var prefix = "//span[text()='" + displayName + "']";
     var selAttribute = new Select(By.XPath(prefix + "/../../../../../table[2]//table[contains(@id,'_filterTable')]//select[contains(@id,'_queryField" + (row + 1) + "')]"));
     var txtCriteria = new TextBox(By.XPath(prefix + "/../../../../../table[2]//table[contains(@id,'_filterTable')]//input[contains(@id,'_queryCriteria" + (row + 1) + "')]"));
     Wait.Until(d => selAttribute.Enabled && optionElement.Exists && txtCriteria.Enabled);
     selAttribute.SelectOption(attribute);
     txtCriteria.Value = criteria;
     component.BtnGo.Click();
     Wait.Until(d => component.BtnGo.Enabled);
 }
コード例 #5
0
 public void AddBranch(String stepName, String targetStepName)
 {
     var btnAddBranch = new Button(
         By.XPath("(//*[@id='_webrRSV_DIV_0']/table/tbody/tr/td[3]/a[text()='" + stepName +
                  "'])[1]/../../td[6]/input[@value='Add Branch']"));
     var parentWindow = CurrentWindowTitle;
     btnAddBranch.Click();
     PopUpWindow.SwitchTo("Edit SmartForm Branch");
     var selNextStep = new Select(By.Name("WizardBranch.nextPage"));
     selNextStep.SelectOption(targetStepName);
     var btnOk = new Button(By.CssSelector("input[value='OK']"));
     btnOk.Click();
     PopUpWindow.SwitchTo(parentWindow);
     var spanExpected = new Container(
         By.XPath("(//*[@id='_webrRSV_DIV_0']/table/tbody/tr/td[3]/a[text()='" + stepName + "" +
                  "'])[1]/../../td[4]/table/tbody/tr/td/table/tbody/tr/td[2]/span[text()='" + targetStepName + "']"));
     Wait.Until(d => spanExpected.Exists);
 }