public void WhenIGoToTheUNCChangeManagementPageForEditing(Table changeRows) { try { BBCRMHomePage.OpenConstituentsFA(); // open constituent functional area string xPathLink = "//button[contains(@class,'bui-linkbutton')]/div[text()='UNC Change Management']"; //click on the UNC Change Management Button ConstituentPanel.WaitClick(xPathLink); if (changeRows.RowCount != 1) { throw new ArgumentException("Only provide one row to select."); } var changeRow = changeRows.Rows[0]; // select only the first row changeRow["Name"] = changeRow["Name"] + uniqueStamp; //Use the unique stamp at the end of the name //select the row for the particular constituent Panel.SelectSectionDatalistRow(changeRow, "Constituent Change Requests"); } catch (Exception ex) { throw new Exception("Error: could not go to the Change Management page for an edit address change request. " + ex.Message); } }
public void WhenIDeceaseASpouse() { ConstituentPanel.SelectInfoTab(); // Go to the personal info tab string xPathdeceased = "//td[contains(@class,'x-toolbar-cell') and not (contains(@class,'x-hide-display'))]//table[contains(@id,'bbui-gen-tbaraction-')and not(contains(@class,'hide'))]/tbody/tr[2]/td[2]/em/button[./text() = 'Mark deceased']"; ConstituentPanel.WaitClick(xPathdeceased); Dialog.SetTextField("//div[contains(@id, 'IndividualMarkDeceasedEditForm2')]//input[contains(@id, '_DECEASEDDATE_value')]", "10/15/2016"); Dialog.Save(); }
public void GivenIStartAnAddChangeRequestForConstituent() { try { BBCRMHomePage.OpenConstituentsFA(); // open the constituent functional area //click on the link to open form to add a new individual by request ConstituentPanel.WaitClick("//button[contains(@class,'linkbutton')]/div[text()='UNC Request Add a New Individual']", 10); } catch (Exception ex) { throw new Exception("Error: could not start a change request. " + ex.Message); } }
private void AddMatchingGiftConditions() { try { ConstituentPanel.SelectInfoTab(); ConstituentPanel.SelectInnerTab("Organization"); string xButtonPath = "//div[contains(@class,'bbui-pages-contentcontainer') and not(contains(@class,'hide'))]//div[not(contains(@class,'x-hide-display')) and contains(@class,'bbui-pages-pagesection') and not(contains(@class,'row'))]//div[contains(@id,'pageSection')]/div/table/tbody/tr//td/table/tbody/tr//td/div[./text() = 'Matching gift conditions']/../../../../../../../../../../../div[contains(@class,'bbui-pages-section-tbar')]//tr//button[text()='Add']"; ConstituentPanel.WaitClick(xButtonPath, 20); Dialog.SetDropDown("//div[contains(@id, '_MatchingGiftConditionAddForm2')]//input[contains(@id,'_MATCHINGGIFTCONDITIONTYPECODEID_value')]", "Employee"); Dialog.SetTextField("//div[contains(@id, '_MatchingGiftConditionAddForm2')]//input[contains(@id,'_MATCHINGFACTOR_value')]", "0.50"); Dialog.Save(); } catch (Exception ex) { throw new Exception("Error: could not enter fields for a test organization. " + ex.ToString()); } }
public void WhenIGoToTheUNCChangeManagementPage(Table changeRows) { try { BBCRMHomePage.OpenConstituentsFA(); // open constituent functional area string xPathLink = "//button[contains(@class,'bui-linkbutton')]/div[text()='UNC Change Management']"; //click on the UNC Change Management BUtton ConstituentPanel.WaitClick(xPathLink); if (changeRows.RowCount != 1) { throw new ArgumentException("Only provide one row to select."); } var changeRow = changeRows.Rows[0]; // select only the first row changeRow["Name"] = changeRow["Name"] + uniqueStamp; //Use the unique stamp at the end of the name //select the row for the particular constituent Panel.SelectSectionDatalistRow(changeRow, "Constituent Change Requests"); //Change the Personal/Org information -- middle name to William Dialog.WaitClick("*//button[./text()='Personal/Org Info' and contains(@class,'x-btn-text')]", 20); if (changeRow["Name"].Contains("Testings")) { string xMiddleNamePath = "//input[contains(@id, '_MIDDLENAME_value')]"; Dialog.SetTextField(xMiddleNamePath, "William"); } else { string xNumberEmployeesPath = "//input[contains(@id, 'NUMEMPLOYEES_value')]"; Dialog.SetTextField(xNumberEmployeesPath, "400"); } //Approve personal info with changes string xRequestStatusPath = "//input[contains(@id, '_REQUESTSTATUSCODEID_value')]"; Dialog.SetDropDown(xRequestStatusPath, "Approved with changes"); Dialog.ClickButton("Commit Changes", 50); System.Threading.Thread.Sleep(5000); //select the row for the particular constituent Panel.SelectSectionDatalistRow(changeRow, "Constituent Change Requests"); //Reject individual relationships Dialog.WaitClick("*//button[./text()='Individual Relationships' and contains(@class,'x-btn-text')]", 20); xRequestStatusPath = "//input[contains(@id, '_RELATIONSHIPSTATUSCODEID_value')]"; Dialog.SetDropDown(xRequestStatusPath, "Rejected"); Dialog.Save(); System.Threading.Thread.Sleep(5000); //select the row for the particular constituent Panel.SelectSectionDatalistRow(changeRow, "Constituent Change Requests"); //Accept Business relationships Dialog.WaitClick("*//button[./text()='Business/Org Relationships' and contains(@class,'x-btn-text')]", 20); xRequestStatusPath = "//input[contains(@id, '_BUSINESSREQUESTSTATUSCODEID_value')]"; Dialog.SetDropDown(xRequestStatusPath, "Approved as requested"); Dialog.Save(); System.Threading.Thread.Sleep(5000); //select the row for the particular constituent Panel.SelectSectionDatalistRow(changeRow, "Constituent Change Requests"); //Accept with Changes - Other changes Dialog.WaitClick("*//button[./text()='Other' and contains(@class,'x-btn-text')]", 20); xRequestStatusPath = "//input[contains(@id, '_OTHERREQUESTSTATUSCODEID_value')]"; Dialog.SetDropDown(xRequestStatusPath, "Approved with changes"); Dialog.Save(); } catch (Exception ex) { throw new Exception("Error: could not go to the UNC Change Management page. " + ex.Message); } }