public void ATC3311_CRMInvestigationVerifyActionFollowupDateRemoval() { User user = this.environment.GetUser(SecurityRole.InvestigationsOfficer); new LoginDialog().Login(user.Id, user.Password); HomePage homePage = new HomePage(driver); homePage.HoverCRMRibbonTab(); homePage.ClickInvestigationsRibbonButton(); homePage.HoverInvestigationsRibbonTab(); homePage.ClickInvestigationsCasesRibbonButton(); InvestigationCaseSearchPage investigationsCaseSearchPage = new InvestigationCaseSearchPage(driver); investigationsCaseSearchPage.ClickNewInvestigationCaseButton(); // Create new case and validate Status and Substatus fields InvestigationCasePage investigationCasePage = new InvestigationCasePage(driver); investigationCasePage.ClickSaveButton(); String caseNumber = investigationCasePage.GetInvestigationCaseNumber(); investigationCasePage.ClickSaveCloseButton(); // Search for the newly created Investigation Case investigationsCaseSearchPage = new InvestigationCaseSearchPage(driver); investigationsCaseSearchPage.SetInvestigationSearchText(caseNumber); Table table = new Table(investigationsCaseSearchPage.GetSearchResultTable()); table.ClickCellValue("Case Number", caseNumber, "Case Number"); // Validate Action Date and Followup date fields are removed investigationCasePage = new InvestigationCasePage(driver); investigationCasePage.ClickPageTitle(); Assert.IsFalse(investigationCasePage.VerifyElementExists("#rta_action_date_c"), "Action Date Present with CssValue rta_action_date_c"); Assert.IsFalse(investigationCasePage.VerifyElementExists("#rta_inv_action_dateid_c"), "Action Date Present with CssValue rta_inv_action_dateid_c"); Assert.IsFalse(investigationCasePage.VerifyElementExists("#rta_investigation_action_dateid_c"), "Action Date Present with CssValue rta_investigation_action_dateid_c"); Assert.IsFalse(investigationCasePage.VerifyElementExists("#action_date_c"), "Action Date Present with CssValue action_date_c"); Assert.IsFalse(investigationCasePage.VerifyElementExists("#rta_action_dateid_c"), "Action Date Present with CssValue rta_action_dateid_c"); Assert.IsFalse(investigationCasePage.VerifyElementExists("#rta_followup_date_c"), "Follow up date field present with CssValue: rta_followup_date_c"); Assert.IsFalse(investigationCasePage.VerifyElementExists("#rta_inv_followup_dateid_c"), "Follow up date field present with CssValue: rta_inv_followup_dateid_c"); Assert.IsFalse(investigationCasePage.VerifyElementExists("#rta_investigation_followup_dateid_c"), "Follow up date field present with CssValue: rta_investigation_followup_dateid_c"); Assert.IsFalse(investigationCasePage.VerifyElementExists("#followup_date_c"), "Follow up date field present with CssValue: followup_date_c"); Assert.IsFalse(investigationCasePage.VerifyElementExists("#rta_followup_dateid_c"), "Follow up date field present with CssValue: rta_followup_dateid_c"); }
public void ATC3341_CRMInvestigationNewCaseDefaultsToNewCaseStatus() { User user = this.environment.GetUser(SecurityRole.Investigations); new LoginDialog().Login(user.Id, user.Password); HomePage homePage = new HomePage(driver); homePage.HoverCRMRibbonTab(); homePage.ClickInvestigationsRibbonButton(); homePage.HoverInvestigationsRibbonTab(); homePage.ClickInvestigationsCasesRibbonButton(); Trace.Listeners.Add(new TextWriterTraceListener("TextWriterOutput.log", "myListener")); Trace.TraceInformation("Create new investigation case start:" + DateTime.Now.ToString("ddMMyyyyhhmmssffff")); Trace.Flush(); InvestigationCaseSearchPage investigationsCaseSearchPage = new InvestigationCaseSearchPage(driver); investigationsCaseSearchPage.ClickNewInvestigationCaseButton(); // Create new case and validate Status and Substatus fields InvestigationCasePage investigationCasePage = new InvestigationCasePage(driver); Assert.AreEqual("New case", investigationCasePage.GetStatus()); Assert.AreEqual("Creation", investigationCasePage.GetSubStatus()); investigationCasePage.ClickSaveButton(); String caseNumber=investigationCasePage.GetInvestigationCaseNumber(); investigationCasePage.ClickSaveCloseButton(); // Search for the newly created Investigation Case investigationsCaseSearchPage = new InvestigationCaseSearchPage(driver); investigationsCaseSearchPage.SetInvestigationSearchText(caseNumber); Table table = new Table(investigationsCaseSearchPage.GetSearchResultTable()); table.ClickCellValue("Case Number", caseNumber, "Case Number"); // Validate the activity created for New Investigation case investigationCasePage = new InvestigationCasePage(driver); StringAssert.Contains(investigationCasePage.GetInvestigationCaseNumber(), caseNumber); table = new Table(investigationCasePage.GetActivitiesSearchResultTable()); StringAssert.Contains(table.GetCellContainsValue("Subject", caseNumber+": Scan documents", "Activity Status"), "Open"); StringAssert.Contains(table.GetCellContainsValue("Subject", caseNumber + ": Add parties", "Activity Status"), "Open"); StringAssert.Contains(table.GetCellContainsValue("Subject", caseNumber + ": Submit for initial assessment", "Activity Status"), "Open"); Trace.Listeners.Add(new TextWriterTraceListener("TextWriterOutput.log", "myListener")); Trace.TraceInformation("Create new investigation case end:" + DateTime.Now.ToString("ddMMyyyyhhmmssffff")); Trace.Flush(); }
public void ATC6707_CRMInvestigationNewCaseTasksInOutlook() { User user = this.environment.GetUser(SecurityRole.InvestigationsOfficer); new LoginDialog().Login(user.Id, user.Password); HomePage homePage = new HomePage(driver); homePage.HoverCRMRibbonTab(); homePage.ClickInvestigationsRibbonButton(); homePage.HoverInvestigationsRibbonTab(); homePage.ClickInvestigationsCasesRibbonButton(); InvestigationCaseSearchPage investigationsCaseSearchPage = new InvestigationCaseSearchPage(driver); investigationsCaseSearchPage.ClickNewInvestigationCaseButton(); // Create new case and validate Status and Substatus fields InvestigationCasePage investigationCasePage = new InvestigationCasePage(driver); investigationCasePage.ClickSaveButton(); String caseNumber = investigationCasePage.GetInvestigationCaseNumber(); investigationCasePage.ClickSaveCloseButton(); // Search for the newly created Investigation Case investigationsCaseSearchPage = new InvestigationCaseSearchPage(driver); investigationsCaseSearchPage.SetInvestigationSearchText(caseNumber); Table table = new Table(investigationsCaseSearchPage.GetSearchResultTable()); table.ClickCellValue("Case Number", caseNumber, "Case Number"); // Validate the activity created for New Investigation case investigationCasePage = new InvestigationCasePage(driver); StringAssert.Contains(investigationCasePage.GetInvestigationCaseNumber(), caseNumber); table = new Table(investigationCasePage.GetActivitiesSearchResultTable()); StringAssert.Contains(table.GetCellContainsValue("Subject", caseNumber + ": Scan documents", "Activity Status"), "Open"); StringAssert.Contains(table.GetCellContainsValue("Subject", caseNumber + ": Add parties", "Activity Status"), "Open"); StringAssert.Contains(table.GetCellContainsValue("Subject", caseNumber + ": Submit for initial assessment", "Activity Status"), "Open"); // Navigate to Outlook and verify the task - Paul }
public void ATC6827_CRMCheckInvestigatorField() { User user = this.environment.GetUser(SecurityRole.Investigations); new LoginDialog().Login(user.Id, user.Password); HomePage homePage = new HomePage(driver); homePage.HoverCRMRibbonTab(); homePage.ClickInvestigationsRibbonButton(); homePage.HoverInvestigationsRibbonTab(); homePage.ClickInvestigationsCasesRibbonButton(); InvestigationCaseSearchPage investigationsCaseSearchPage = new InvestigationCaseSearchPage(driver); investigationsCaseSearchPage.ClickNewInvestigationCaseButton(); InvestigationCasePage investigationCasePage = new InvestigationCasePage(driver); string user02 = "IMSTestU02"; Assert.IsTrue(investigationCasePage.GetInvestigatorSearchElementText(user02)); investigationCasePage.ClickSaveButton(); string investigationCase = investigationCasePage.GetInvestigationCaseNumber(); investigationCasePage.ClickSaveCloseButton(); investigationsCaseSearchPage = new InvestigationCaseSearchPage(driver); investigationsCaseSearchPage.SetInvestigationSearchText(investigationCase); Table table = new Table(investigationsCaseSearchPage.GetSearchResultTable()); StringAssert.Contains(table.GetCellValue("Case Number", investigationCase, "Investigator"), user02); }
public void ATC3367c_CRMSendemailfromCRMNewActivity() { #region Start Up Excel MyBook = MyApp.Workbooks.Open(DatasourceDir + @"\Investigations.xlsx", 0, false, 5, "", "", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0); MySheet = (Excel.Worksheet)MyBook.Sheets[Properties.Settings.Default.ENVIRONMENT.ToString()]; MyRange = MySheet.UsedRange; //Get specific row for the data int testDataRows = MyRange.Rows.Count; int MyRow = 0; for (int i = 2; i <= testDataRows; i++) { if (MyRange.Cells[i, 1].Value.ToString()== "3367") { MyRow = i; break; } } #endregion string investigationID = MyRange.Cells[MyRow, InvestigationSchema.GetColumnIndex(ColumnName.IN_ID)].Value.ToString(); User user = this.environment.GetUser(SecurityRole.Investigations); new LoginDialog().Login(user.Id, user.Password); HomePage homePage = new HomePage(driver); homePage.HoverCRMRibbonTab(); homePage.ClickInvestigationsRibbonButton(); homePage.HoverInvestigationsRibbonTab(); homePage.ClickInvestigationsCasesRibbonButton(); InvestigationCaseSearchPage investigationsCaseSearchPage = new InvestigationCaseSearchPage(driver); investigationsCaseSearchPage.SetInvestigationSearchText(investigationID); Table table = new Table(investigationsCaseSearchPage.GetSearchResultTable()); table.ClickCellValue("Case Number", investigationID, "Case Number"); InvestigationCasePage investigationCasePage = new InvestigationCasePage(driver); StringAssert.Contains(investigationCasePage.GetInvestigationCaseNumber(), investigationID); table = new Table(investigationCasePage.GetActivitiesSearchResultTable()); StringAssert.Contains(table.GetCellContainsValue("Subject", "Test 3367 CRM Email Creation RTA:", "Activity Status"), "Completed"); #region Shut down Excel MyBook.Save(); MyBook.Close(); MyApp.Quit(); #endregion }