public void WhenIAddAd_HocQueryType(string queryType) { try { BBCRMHomePage.OpenAnalysisFA(); //open the analysis functional area AnalysisFunctionalArea.InformationLibrary(); //open the information library InformationLibraryPanel.SelectTab("Queries"); //Select the queries tab string querystring = "//div/table/tbody/tr//td/table/tbody/tr//td/div/../..//td/table/tbody/tr/td/em/button[./text() = 'Add an ad-hoc query']"; InformationLibraryPanel.WaitClick(querystring, 10); //click on the "ad-hoc query" button Dialog.SetDropDown(Dialog.getXInput("AdHocQueryNewForm", "RECORDTYPE_value"), queryType); //start the adhoc query for the selected querytype string gridRowXPath = ""; if (queryType == "Constituent") { //Fundraisers gridRowXPath = "//div[contains(@id,'AdHocQueryNewForm')]//div[contains(@id, 'GROUPTYPE-Constituent-bd')]/div[3]/table"; } else if (queryType == "Revenue") { gridRowXPath = "//div[contains(@id,'AdHocQueryNewForm')]//div[contains(@id, 'GROUPTYPE-Revenue-bd')]/div[2]/table"; } InformationLibraryPanel.WaitClick(gridRowXPath, 20); //click on that row InformationLibraryPanel.WaitClick(Dialog.getXOKButton, 20); } catch (Exception ex) { throw new Exception("Error: could not add an adhoc query. " + ex.Message); } }
public void GivenAStaticSelectionCopyOfQueryExists(string selection, string query) { BBCRMHomePage.OpenAnalysisFA(); AnalysisFunctionalArea.InformationLibrary(); IDictionary <string, string> queryRow = new Dictionary <string, string> { { "Name", query } }; if (!InformationLibraryPanel.QueryExists(queryRow)) { CreateUnacknowledgedRevenueSelection(query); } IDictionary <string, string> selectionRow = new Dictionary <string, string> { { "Name", selection } }; if (InformationLibraryPanel.QueryExists(selectionRow)) { InformationLibraryPanel.DeleteQuery(selectionRow); //re-nvaigate should not be necessary. only done due to filed bug 490200 BBCRMHomePage.OpenAnalysisFA(); AnalysisFunctionalArea.InformationLibrary(); } InformationLibraryPanel.CopyQueryAsStaticSelection(selection, queryRow); }
public void GivenIAddAConstituentAd_HocQuery() { //navigate to Analysis>Info Library BBCRMHomePage.OpenAnalysisFA(); AnalysisFunctionalArea.OpenLink("Information library"); //create new Constituent type query Panel.ClickButton("Add an ad-hoc query"); //QuerySourceViewDialog.SetRecordType("Constituents"); QuerySourceViewDialog.SelectRecordTypeName("Constituents"); QuerySourceViewDialog.ClickButton("OK"); }
public void WhenIAddAAd_HocQuery(string queryType) { // Open the Analysis functional Area BBCRMHomePage.OpenAnalysisFA(); // Open the QueryPanel 4.0 (Information Library) AnalysisFunctionalArea.OpenLink("Information library"); Panel.ClickButton("Add an ad-hoc query"); // Select the record type we're intersted in QuerySourceViewDialog.SetRecordType(queryType); QuerySourceViewDialog.SelectRecordTypeName(queryType); QuerySourceViewDialog.ClickButton("OK"); }
public void GivenUnacknowledgedRevenueQueryExists(string selection) { BBCRMHomePage.OpenAnalysisFA(); AnalysisFunctionalArea.InformationLibrary(); IDictionary <string, string> selectionRow = new Dictionary <string, string> { { "Name", selection } }; if (InformationLibraryPanel.QueryExists(selectionRow)) { return; } CreateUnacknowledgedRevenueSelection(selection); }
public void GivenOpenTheFunctionalArea(string areaName) { if (areaName == "Constituent") { BBCRMHomePage.OpenConstituentsFA(); //Open constituents functional area } if (areaName == "Revenue") { BBCRMHomePage.OpenRevenueFA(); // open revenue functional area } if (areaName == "Analysis") { BBCRMHomePage.OpenAnalysisFA(); // open analysis functional area //Open prospect management reports Dialog.WaitClick("//button[contains(@class,'linkbutton')]/div[text()='" + "Prospect management reports" + "']", 10); } }
public void WhenIAddAConstituentAdhocQueryType() { try { BBCRMHomePage.OpenAnalysisFA(); //open the analysis functional area AnalysisFunctionalArea.InformationLibrary(); //open the information library InformationLibraryPanel.SelectTab("Queries"); //Select the queries tab string querystring = "//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/../..//td/table/tbody/tr/td/em/button[./text() = 'Add an ad-hoc query']"; InformationLibraryPanel.WaitClick(querystring, 10); //click on the "ad-hoc query" button string gridRowXPath = "//div[contains(@id,'GROUPTYPE-Most commonly used')]/div[1]/table/tbody/tr"; //select one of the rows for that query type InformationLibraryPanel.WaitClick(gridRowXPath, 10); //click on that row InformationLibraryPanel.WaitClick(Dialog.getXOKButton, 10); } catch (Exception ex) { throw new Exception("Error: could not add a constituent ad hoc query type. " + ex.Message); } }
public void WhenIAddAd_HocQueryType(string queryType) { BBCRMHomePage.OpenAnalysisFA(); AnalysisFunctionalArea.InformationLibrary(); InformationLibraryPanel.AddAdHocQuery(queryType); }