public void WhenIStartToAddABatchWithTemplateAndDescription(string template, string description, Table batchRows) { try { description += uniqueStamp; //The unique stamp is a series of numbers to keep constituents different from each other BBCRMHomePage.OpenRevenueFA(); //Open revenue functional area RevenueFunctionalArea.BatchEntry(); BatchEntryPanel.AddBatch(template, description); //add a new batch according to the template name and description foreach (var batchRow in batchRows.Rows) { if (batchRow.Keys.Contains("Constituent") && batchRow["Constituent"] != null && batchRow["Constituent"] != string.Empty) { batchRow["Constituent"] += uniqueStamp; //The unique stamp is a series of numbers to keep constituents different from each other } } EnhancedRevenueBatchDialog.SetGridRows(batchRows); // ThenIAddBatchAmounts(100); EnhancedRevenueBatchDialog.UpdateProjectedTotals(); //click on the update projected totals button and receive updated totals } catch (Exception ex) { throw new Exception("Error: could not add a batch with specified template and description. " + ex.Message); } }
public void WhenIStartToAddABatchWithTemplateAndDescriptionforAPledge(string template, string description, Table batchRows) { try { description += uniqueStamp; //The unique stamp is a series of numbers to keep constituents different from each other BBCRMHomePage.OpenRevenueFA(); //Open revenue functional area RevenueFunctionalArea.BatchEntry(); BatchEntryPanel.AddBatch(template, description); //add a new batch according to the template name and description foreach (var batchRow in batchRows.Rows) { if (batchRow.Keys.Contains("Constituent") && batchRow["Constituent"] != null && batchRow["Constituent"].ToString() != "Testmatchingcompany" && batchRow["Constituent"] != string.Empty) { batchRow["Constituent"] += uniqueStamp; //The unique stamp is a series of numbers to keep constituents different from each other } } EnhancedRevenueBatchDialog.SetGridRows(batchRows); if (template == "DEV-Check-MG Payments") { Dialog.Cancel(); // cancel the unneeded popup } EnhancedRevenueBatchDialog.UpdateProjectedTotals(); //click on the update projected totals button and receive updated totals EnhancedRevenueBatchDialog.Validate(); //validate batch EnhancedRevenueBatchDialog.ClickButton("Update status", 50); // update the batch status EnhancedRevenueBatchDialog.SetDropDown("//input[contains(@id, '_NEXTBATCHWORKFLOWTASKID_value')]", "Validate Data Totals and Other Information"); EnhancedRevenueBatchDialog.SetDropDown("//input[contains(@id, '_OWNERID_value')]", "ad\\bbtest1.gst"); Dialog.WaitClick("//div[contains(@id,'dataformdialog_')]//button[text()='Save']", 20); //save the batch EnhancedRevenueBatchDialog.UpdateProjectedTotals(); //click on the update projected totals button and receive updated totals EnhancedRevenueBatchDialog.Validate(); //validate the batch EnhancedRevenueBatchDialog.ClickButton("Update status", 20); //update the status EnhancedRevenueBatchDialog.SetDropDown("//input[contains(@id, '_NEXTBATCHWORKFLOWTASKID_value')]", "Special Review"); EnhancedRevenueBatchDialog.SetDropDown("//input[contains(@id, '_OWNERID_value')]", "ad\\bbtest1.gst"); Dialog.WaitClick("//div[contains(@id,'dataformdialog_')]//button[text()='Save']", 20); //save the batch EnhancedRevenueBatchDialog.UpdateProjectedTotals(); //click on the update projected totals button and receive updated totals EnhancedRevenueBatchDialog.Validate(); //validate the batch EnhancedRevenueBatchDialog.ClickButton("Update status", 20); //update the status EnhancedRevenueBatchDialog.SetDropDown("//input[contains(@id, '_NEXTBATCHWORKFLOWTASKID_value')]", "Commit Batch"); EnhancedRevenueBatchDialog.SetDropDown("//input[contains(@id, '_OWNERID_value')]", "ad\\bbtest1.gst"); Dialog.WaitClick("//div[contains(@id,'dataformdialog_')]//button[text()='Save']", 20); //save the batch EnhancedRevenueBatchDialog.SaveAndClose(); } catch (Exception ex) { throw new Exception("Error: could not add a batch with specified template and description for a pledge. " + ex.Message); } }
public void WhenIStartToAddABatchWithTemplateAndDescription(string template, string description, Table batchRows) { description += uniqueStamp; BBCRMHomePage.OpenRevenueFA(); RevenueFunctionalArea.BatchEntry(); BatchEntryPanel.AddBatch(template, description); foreach (var batchRow in batchRows.Rows) { if (batchRow.Keys.Contains("Constituent") && batchRow["Constituent"] != null && batchRow["Constituent"] != string.Empty) { batchRow["Constituent"] += uniqueStamp; } } BatchDialog.SetGridRows(batchRows); EnhancedRevenueBatchDialog.UpdateProjectedTotals(); }
public void WhenIAddABatchWithTemplateAndDescription(string template, string description, Table batchRows) { description += uniqueStamp; BBCRMHomePage.OpenRevenueFA(); RevenueFunctionalArea.BatchEntry(); BatchEntryPanel.AddBatch(template, description); foreach (var batchRow in batchRows.Rows) { if (batchRow.Keys.Contains("Constituent") && batchRow["Constituent"] != null && batchRow["Constituent"] != string.Empty) { batchRow["Constituent"] += uniqueStamp; } } EnhancedRevenueBatchDialog.SetGridRows(batchRows); Dialog.WaitClick("//button[./text()='Update projected totals']"); Dialog.WaitClick("//button[./text()='OK']"); BatchDialog.Validate(); BatchDialog.SaveAndClose(); }
public void WhenIAddABatchWithTemplateAndDescription(string template, string description, Table batchRows) { description += uniqueStamp; StepHelper.SetTodayDateInTableRow("Date", batchRows); StepHelper.SetTodayDateInTableRow("Installment start date", batchRows); BBCRMHomePage.OpenRevenueFA(); BaseComponent.GetEnabledElement(XpathHelper.xPath.VisiblePanel + "//span[text()='Revenue']"); RevenueFunctionalArea.BatchEntry(); BaseComponent.GetEnabledElement(XpathHelper.xPath.VisiblePanel + "//span[text()='Batch Entry']"); BatchEntryPanel.AddBatch(template, description); foreach (var batchRow in batchRows.Rows) { if (batchRow.Keys.Contains("Constituent") && batchRow["Constituent"] != null && batchRow["Constituent"] != string.Empty) { batchRow["Constituent"] += uniqueStamp; } } //Set fields in batch SetGridRows(batchRows); }